Skip to content

mdix/propcopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Point separated string to object properties (+ value) for npm ('prop.prop.prop' => {prop: {prop: {prop: null}}}

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published