0.1.0 • Published 10 years ago
string-to-object v0.1.0
propcopy
Takes a string with point separated object properties and adds them to a real object (+ adds a value)
Getting Started
Install the module with: npm install propcopy
var propcopy = require('propcopy');
console.log(propcopy.add('propOne.propTwo.propThree.propFour', 'someValue'));
// will return: {propOne: {propTwo: {propThree: {propFour: 'someValue'}}}}
propcopy.get();
// will return: {propOne: {propTwo: {propThree: {propFour: 'someValue'}}}}
// propcopy.get() returns everything that has been set via add()
Documentation
(Coming soon)
Examples
see Getting Started
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
(Nothing yet)
License
Copyright (c) 2013 Marc Dix Licensed under the MIT license.
0.1.0
10 years ago