generate-object-property

1.2.0 • Public • Published

generate-object-property

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

npm install generate-object-property

build status

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

Readme

Keywords

none

Package Sidebar

Install

npm i generate-object-property

Weekly Downloads

1,018,666

Version

1.2.0

License

MIT

Last publish

Collaborators

  • mafintosh