Package Exports
- @jswork/str2kv
- @jswork/str2kv/dist/cjs/index.js
- @jswork/str2kv/dist/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jswork/str2kv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
str2kv
String to kv obj.
installation
npm install @jswork/str2kvusage
import str2kv from '@jswork/str2kv';
// default saparator is [:/@]
const kmstr1 = '1id:value; 2id:value2; 3id:value3';
const obj1 = str2kv(km2str);
// { '1id': 'value', '2id': 'value2', '3id': 'value3' }
// custom saparator
const kmstr2 = '1id:value; 2id:value2; 3id:value3';
const obj2 = str2kv(km2str, ':');
// { '1id': 'value', '2id': 'value2', '3id': 'value3' }license
Code released under the MIT license.