path-to-json

1.0.5 • Public • Published

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))

Package Sidebar

Install

npm i path-to-json

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

1.65 kB

Total Files

4

Last publish

Collaborators

  • jagamypriera