@oceanfe/flatten-path
v0.3.1
Published
[![npm version](https://badgen.net/npm/v/@al-c/flatten-path)](https://www.npmjs.com/package/@al-c/flatten-path)
Downloads
3
Readme
flatten-path
how to use
import { makeTree, flatten } from '@al-c/flatten-path';
const data = [
`packages.json`,
`readme.md`,
`src/components/hold/a/a/a.js`,
`src/components/hold/a/a/b.js`,
`src/components/hold/b/a/b.js`,
`src/components/kiss/a/b.js`,
`src/components/kiss/b/a.js`,
`src/components/a/b.js`,
`src/another/components/a/b.js`,
`utils/a/b.js`,
`utils/b/b.js`,
];
console.log(flatten(data));
console.log(makeTree(data));