csv-property
v1.0.3
Published
convert to csv string to JSON object
Downloads
3
Readme
csv-property
Convert CSV string to JSON object
Convert JSON object to CSV string
CSV string: "path1, path2, path3, string"
// From
'popup, title, Login'
// To
{
popup: {
title: 'Login'
}
}
Install
npm install csv-property
Usage
const { toObject, toCSVString } = require('csv-property')
toObject([ 'popup, title, Login' ]) // { popup: { title: 'Login' } }
toCSVString({ popup: { title: 'Login' } }) // [ 'popup, title, Login' ]
toObject([ 'popup; title; Login' ], ';') // { popup: { title: 'Login' } }
toCSVString({ popup: { title: 'Login' } }, ';') // [ 'popup; title; Login' ]
License
MIT © Bob Hwang