line-wrap
writable stream that reformats text and wraps lines to a specific line width (default 80).
also available as a command-line tool
installation
# server/clientnpm install --save line-wrap # CLInpm install line-wrap -g
CLI usage
$ line-wrapUsage: line-wrap <file> [-w 80] [--width=80] [-] $ cat hello.txthello world $ line-wrap hello.txt -w 2hello world
JS usage
var lineWrap = var wrapStream = // opts are optional, default is width: 80 processstdin