2.0.1 • Published 7 years ago

object-to-string-path-array v2.0.1

Weekly downloads
14
License
-
Repository
gitlab
Last release
7 years ago

object-to-string-path-array

This little library converts an object to an array of (string) paths.

For example:

import toPathArray from 'object-to-string-path-array';
toPathArray({
    aaa: 'bbb',
    ccc: ['ddd', 'eee'],
    fff: {
        ggg: {
            hhh: ['iii', 'jjj']
        }
    }
}, '/');

Will return:

[
    'aaa/bbb',
    'ccc/ddd',
    'ccc/eee',
    'fff/ggg/hhh/iii',
    'fff/ggg/hhh/jjj'
]
2.0.1

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago