path-to-json
v1.0.5
Published
Convert /path/to/file to {path:{to:{file:{}}}}
Downloads
2
Maintainers
Readme
path-to-json
Convert /path/to/file to {path:{to:{file:{}}}}
Install
$ npm install path-to-json
Usage
const pathToJSON=require("path-to-json")
const data=[
'any/path/to/file/or/folder',
'other/path/to/file/or/folder'
]
const extraData='anything' //optional
const converted=pathToJSON(data,extraData)
console.log(JSON.stringify(converted,null,4))