paths-tree
Creates tree of objects from a collection of file paths
Last updated 7 years ago by bahmutov .
MIT · Original npm · Tarball · package.json
$ cnpm install paths-tree 
SYNC missed versions from official npm registry.

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'
			}]
		}]
	}]
}

Gleb Bahmutov

Current Tags

  • 0.0.1                                ...           latest (7 years ago)

2 Versions

  • 0.0.1                                ...           7 years ago
  • 0.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |