0.1.1 • Published 6 years ago
object-fromtext v0.1.1
object-fromtext
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'}