value-for-key
v1.0.0
Published
Get a value from a key without breaking JSHint rules
Downloads
8
Readme
value-for-key
When you want to get and set value for keys on objects without causing JSHint camel case errors.
If you also keep getting errors like this:
object.someField = json.some_json_key;
file.js: line 56, col 0, Identifier 'some_json_key' is not in camel case.
Then this module is for you!
Now just:
object.someField = valueForKey(json, 'some_json_key');
Installation
npm install value-for-key
Tests
npm test