1.1.8 • Published 10 months ago

assign-set v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

assign-set

npm.io

Base on lodash.set, But the difference between Array and Array-like object

const assignSet = require('assign-set');

assignSet(obj, 'a.2.c', 'value');
obj = { a: { 2: { c: 'value' } } };

assignSet(obj, 'a[2].c', 'value');
obj = { a: [undefined, undefined, { c: 'value' }] };

The difference of lodash.set

const lodash = require('lodash.set');

assignSet(obj, 'a.2.c', 'value');
obj = { a: [undefined, undefined, { c: 'value' }] };

assignSet(obj, 'a[2].c', 'value');
obj = { a: [undefined, undefined, { c: 'value' }] };
1.1.8

10 months ago

1.1.7

10 months ago

1.1.6

1 year ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago