https://github.com/bendrucker/dot-parts
Split a dot property into its parts
https://github.com/bendrucker/dot-parts
Last synced: 11 months ago
JSON representation
Split a dot property into its parts
- Host: GitHub
- URL: https://github.com/bendrucker/dot-parts
- Owner: bendrucker
- License: mit
- Created: 2015-07-13T18:36:46.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T21:44:12.000Z (almost 7 years ago)
- Last Synced: 2025-04-15T00:03:52.161Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# dot-parts [](https://travis-ci.org/bendrucker/dot-parts) [](https://greenkeeper.io/)
> Split a dot property into its parts
## Install
```
$ npm install --save dot-parts
```
## Usage
```js
var dotParts = require('dot-parts')
// normal
dotParts('foo.bar.baz')
//=> ['foo', 'bar', 'baz']
// escaping with \\
dotParts('foo\\.bar', 'baz')
//=> ['foo.bar', 'baz']
```
## API
#### `dotParts(path)` -> `array[string]`
##### path
*Required*
Type: `string`
A dot-delimeted path.
## License
MIT © [Ben Drucker](http://bendrucker.me)