Skip to content

writable stream that reformats text and wraps lines to a specific line width (default 80). also available as a command line tool

Notifications You must be signed in to change notification settings

max-mapper/line-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

line-wrap

writable stream that reformats text and wraps lines to a specific line width (default 80).

also available as a command-line tool

NPM

installation

# server/client
npm install --save line-wrap

# CLI
npm install line-wrap -g

CLI usage

$ line-wrap
Usage: line-wrap <file> [-w 80] [--width=80] [-]

$ cat hello.txt
hello world

$ line-wrap hello.txt -w 2
he
ll
o 
wo
rl
d

JS usage

var lineWrap = require('line-wrap')
var wrapStream = lineWrap({width: 80}) // opts are optional, default is width: 80

process.stdin.pipe(wrapStream).pipe(process.stdout)

About

writable stream that reformats text and wraps lines to a specific line width (default 80). also available as a command line tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published