generate-object-property

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
generate-object-property
2601.2.08 years ago9 years agoMinified + gzip package size for generate-object-property in KB

Readme

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