JSPM

generate-object-property

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2470527
  • Score
    100M100P100Q203692F
  • License MIT

Generate safe JS code that can used to reference a object property

Package Exports

  • generate-object-property
  • generate-object-property/index.js

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 (generate-object-property) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

generate-object-property

Generate safe JS code that can used to reference a object property

npm install generate-object-property

Usage

var gen = require('generate-object-property');
console.log(gen('a','b')); // prints a.b
console.log(gen('a', 'foo-bar')); // prints a["foo-bar"]

License

MIT