directory-to-object

Analyze a directory structure and return a json representation. Expects a flat
folder structure with either files or directories.
Installation
$ npm install directory-to-object
Usage
const dto = require('directory-to-object')
const path = require('path')
dto(path.resolve('./test'), (err, res) => console.log(res))
API
dto(opts|path, callback)
dto(path.resolve('./test'), (err, res) => console.log(res))
const opts = {noDot: true, path: path.resolve('./test')}
dto(opts, (err, res) => console.log(res))
Why?
When parsing several directories of files it's nice to just have to
provide a path rather than creating an index object manually. This is useful
for creating static sites out of markdown files.
See Also
License
MIT