Skip to content

Path Dotize - converts object path tokens or string into a single dot separated object path string

License

Notifications You must be signed in to change notification settings

webKrafters/path-dotize

Repository files navigation

Path Dotize

Converts object path tokens or string into a single dot separated object path string.

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

About

Path Dotize - converts object path tokens or string into a single dot separated object path string

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published