JSPM

objset

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q14790F
  • License MIT

Sets a deep value within object

Package Exports

  • objset

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (objset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

objset

Sets a deep value within object

let objSet = require('objset');

objSet({}, 'a', '/', 1);    //{a:1}

objSet({}, 'a/b', '/', 1);  //{a:{b:1}}

objSet({a:{b:1}}, 'a/c', '/', 2); //{a:{b:1, c:2}}