0.0.5 • Published 7 years ago

cskvpp v0.0.5

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

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"
0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago