1.1.6 • Published 4 months ago

assign-set v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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.6

4 months ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago