dir-to-object
Builds an object from the files contained inside a directory.
Installation
npm install dir-to-object
Usage example
const dirToObject = require('dir-to-object');
const { join } = require('path');
const foo = dirToObject(join(__dirname, 'foo'));
console.log(foo);
Contributing
- Fork it (https://github.com/mattiaerre/dir-to-object/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
License
Distributed under the MIT license. See LICENSE for more information.