1.1.0 • Published 7 years ago

pathseq v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

pathseq

Dead simple object path to sequence converter. It breaks a path to an object nested value down to a sequence form.

Install

pathseq is available to download through NPM.

npm install pathseq

Use

pathseq(path);

Arguments

path (string) object nested value path.

Returns

(array) object nested value path sequence.

Examples

Basic use:

const path = 'foo.bar.baz';
const sequence = pathseq(path); // ['foo', 'bar', 'baz']

You can work with arrays too:

const path = 'foo[1].bar[2][3].baz';
const sequence = pathseq(path); // ['foo', 1, 'bar', 2, 3, 'baz']

Develop

If you want to fork and develop pathseq, these commands are for you:

npm run dev
npm run test-dev

Test

pathseq is equipped with a test suite. You can run it with:

npm run test

Licence

MIT

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago