Skip to content

mk-pmb/ersatz-linewrap-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ersatz-linewrap

It somehow wraps lines at about some width.

Usage

var lineWrap = require('ersatz-linewrap'), wrapOpts, text,
  bogusWords = require('ersatz-linewrap/makebogustext');

text = bogusWords(30) +
  '\n    ' + bogusWords(20) +
  '\n' + bogusWords(20);
console.log(lineWrap(text));

console.log('__________\n');

wrapOpts = {
  width: 60,
  hyphen: '<',
  indent: '  >',
  afterWrapped: '¶\n',
};
console.log(lineWrap(text, wrapOpts));

License

ISC

About

It somehow wraps lines at about some width.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published