npm.io
0.1.1 • Published 8 years ago

object-fromtext

Licence
MIT
Version
0.1.1
Deps
0
Vulns
0
Weekly
0

object-fromtext

NPM

Get object from text.

const fromText = require('object-fromtext');
// fromText(<text>, [property separator=\n], [key separator==])

fromText('f1=help\nf2=load');
// {f1: 'help', f2: 'load'}
fromText('f3=find;f4=output', ';');
// {f3: 'find', f4: 'output'}
fromText('f5:continue run;f6:next window', ';', ':');
// {f5: 'continue run', f6: 'next window'}

Keywords