prc b6c02717e6 Upload complete no-internet building environment. | 1 tahun lalu | |
---|---|---|
.. | ||
node_modules | 1 tahun lalu | |
LICENSE | 1 tahun lalu | |
README.md | 1 tahun lalu | |
index.js | 1 tahun lalu | |
package.json | 1 tahun lalu |
Create an object path from a list or array of strings.
Install with npm
$ npm i to-object-path --save
var toPath = require('to-object-path');
toPath('foo', 'bar', 'baz');
toPath('foo', ['bar', 'baz']);
//=> 'foo.bar.baz'
Also supports passing an arguments object (without having to slice args):
function foo()
return toPath(arguments);
}
foo('foo', 'bar', 'baz');
foo('foo', ['bar', 'baz']);
//=> 'foo.bar.baz'
Visit the example to see how this could be used in an application.
a.b.c
) to get a nested value from an object. | homepage'a.b.c'
) paths. | homepageInstall dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on October 28, 2015.