path-dotize
v0.0.2
Published
DX Friendly wrapper for @webkrafters/path-dotize package.
Downloads
2
Maintainers
Readme
Path Dotize
Converts object path tokens or string into a single dot separated object path string.
This is an unscoped version of the @webkrafters/path-dotize package.
Install:
npm i -S path-dotize
Alternate: npm i -S @webkrafters/path-dotize
Example
import dotize from 'path-dotize';
dotize( 'matrix.1.1' ); // => 'matrix.1.1'
dotize( 'matrix[2].0' ); // => 'matrix.2.0'
dotize( 'address' ); // => 'address'
dotize( 'registered.timezone' ); // => 'registered.timezone'
dotize( 'tags[4]' ); // => 'tags.4'
dotize( 'matrix[0][1]' ); // => 'matrix.0.1'
dotize([
'foo',
'bar',
'baz',
'toc'
]); // => 'foo.bar.baz.toc'
License
MIT