Generate safe JS code that can used to reference a object property
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml travis May 16, 2014
LICENSE
README.md
index.js
package.json
test.js

README.md

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