1.0.0 • Published 2 years ago

texts-wrapper v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Texts-Wrapper

Texts-Wrapper is a package that wraps big, chunky texts into smaller texts 👍.

Examples

const textsWrapper = require('texts-wrapper');

const texts = [
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod',
    'nunc euismod, euismod nunc euismod, euismod nunc euismod, euismod'
];

console.log(textsWrapper(texts[0], { width: 20 }));
// => Lorem ipsum dolor
// => sit amet,
// => consectetur
// => adipiscing elit. Sed
// => euismod

console.log(textsWrapper(texts[1], { width: 20 }));
// => nunc euismod,
// => euismod nunc
// => euismod, euismod
// => nunc euismod,
// => euismod

console.log(textsWrapper(texts[1], { width: 10 }));
// => nunc
// => euismod,
// => euismod
// => nunc
// => euismod,
// => euismod
// => nunc
// => euismod,
// => euismod

You can only get support in the GitHub repository. Further support will not be given.