csv-property

1.0.3 • Public • Published

MIT Licence

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

Readme

Keywords

Package Sidebar

Install

npm i csv-property

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.41 kB

Total Files

6

Last publish

Collaborators

  • afrontend