UNPKG

obj-chain-core

Version:

fluent chaining for obj with dot-prop access

8 lines (6 loc) 181 B
const obj = new ObjChain(pkg) const {forrest} = obj .setIfNotEmpty('magical.forrest', 'yup') .when(obj.has('jobs'), () => obj.del('jobs')) .set('eh', true) .get('magical')