Object set/get/sets/gets and other operator.
npm install -S @jswork/next-object-operator
api | params | description |
---|---|---|
get | (path) | Get value by path. |
set | (path,value) | Set value by parh. |
gets | - | Get the whole object. |
sets | (object) | Sets multiple values. |
import NxObjectOperator from '@feizheng/next-object-operator';
const data = {};
const operator = new NxObjectOperator(data);
// operators
operator.set
operator.get
operator.sets
operator.gets
Code released under the MIT license.