paths-tree

0.0.1 • Public • Published

paths-tree

Transforms object with full paths as keys to nested (tree) object. Any values are merged into the node.

example

{
	'c:\foo\bar': {
		'something': 'else'
	}
}

is transformed into

{
	name: '',
	children: [{
		name: 'c:',
		children: [{
			name: 'foo',
			children: [{
				name: 'bar',
				something: 'else'
			}]
		}]
	}]
}

Copyright &2013; Gleb Bahmutov

Readme

Keywords

none

Package Sidebar

Install

npm i paths-tree

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • bahmutov