substr-word
Substr that preserves whole words.
Usage
var substrWord = require('substr-word');
console.log(substrWord('Hello Greetings Goodbye', 20));
//Hello Greetings
Substr that preserves whole words.
var substrWord = require('substr-word');
console.log(substrWord('Hello Greetings Goodbye', 20));
//Hello Greetings
npm i substr-word
14
1.0.1
MIT
2.15 kB
4