node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

wordwrap-component

wordwrap

wordwrap

Installation

$ component install yields/wordwrap

API

wordwrap(str, max, eol)

wordwrap('Hello, World!', 5, '\n');
// > 'Hello\n, Wor\nld!' 

wordwrap(str, max)

wordwrap('Hello, World!', 5);
// > 'Hello\n, Wor\nld!' 

Tests

# make test

License

MIT