parse-kv-file

0.0.2 • Public • Published

parse-kv-file

Pare a kv file, return an object. Zero dependencies.

install

npm install parse-kv-file

hello parse-kv-file

If we have a file follow follwing format:

foo=xxx
bar=xxx

Then we can parse it to an object.

const parseKvFile = require('parse-kv-file');

const fileStr = `foo=xxx
bar=xxx`

console.log(parseKvFile(fileStr));
// { foo: 'xxx', bar: 'xxx' }

Readme

Keywords

Package Sidebar

Install

npm i parse-kv-file

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • zhuqiuyang