cskvpp

0.0.5 • Public • Published

Comma Separated Key-Value Pair Parser (cskvpp)

Small utility to stringify and parse comma separated key-value pairs

Example

import cskvpp from 'cskvpp'

const tags = 'hello=world,abc=123'

const parsedTags = cskvpp.parse(tags)

console.log(parsedTags) // { hello: "world", abc: 123 }

const stringified = cskvpp.stringify(parsedTags);

console.log(stringified); // "hello=world,abc=123"

Example with override

import cskvpp from 'cskvpp'

const tags = 'hello=world|abc=123'

const parsedTags = cskvpp.parse(tags, { separator: '|' })

console.log(parsedTags) // { hello: "world", abc: 123 }

const stringified = cskvpp.stringify(parsedTags, { joiner: '|' });

console.log(stringified); // "hello=world|abc=123"

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i cskvpp

Weekly Downloads

0

Version

0.0.5

License

Apache-2.0

Last publish

Collaborators

  • andrewlively