Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

to-object-path

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

to-object-path

Create an object path from a list or array of strings.

    0.3.0latest

Version published
Maintainers
1
Weekly downloads
18,670,857
decreased by-0.15%

Weekly downloads

Readme

Source

to-object-path NPM version

Create an object path from a list or array of strings.

Install

Install with npm

$ npm i to-object-path --save

Usage

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.

  • get-value: Use property paths ( a.b.c) to get a nested value from an object. | homepage
  • has-value: Returns true if a value exists, false if empty. Works with deeply nested values using… more | homepage
  • omit-value: Omit properties from an object or deeply nested property of an object using object path… more | homepage
  • set-value: Create nested values and any intermediaries using dot notation ('a.b.c') paths. | homepage
  • unset-value: Delete nested properties from an object using dot notation. | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on October 28, 2015.

Keywords

FAQs

What is to-object-path?

Create an object path from a list or array of strings.

Is to-object-path popular?

The npm package to-object-path receives a total of 15,345,398 weekly downloads. As such, to-object-path popularity was classified as popular.

Is to-object-path well maintained?

We found that to-object-path demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 31 Jan 2016
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc