netstringify
A module to generate and parse netstring formats
Install
npm install netstringify
Usage
netstringify
Generate netstring format from normal text.
import netstringify from 'netstringify';
let text = 'hello world!';
let netstring = netstringify(text);
text = [ 'hello world!', 'Foo Bar Foobar!!!', 'hickery dickery dock'];
netstring = netstringify(text);
parse
Parse/convert a netstring format to normal text.
import { netstringify, parse } from 'netstringify';
let text = 'hello world!';
let netstring = netstringify(text);
let parsed = parse(netstring);
text = [ 'hello world!', 'Foo Bar Foobar!!!', 'hickery dickery dock'];
netstring = netstringify(text);
parsed = parse(netstring);