truncate-words
Truncates a string after a certain number of words.
const truncateWords = const a = 'The nuclear deal is based on lies.' // 'The nuclear deal is [...]'
This is similar to the truncatewords filter found in Django.
Truncates a string after a certain number of words.
const truncateWords = const a = 'The nuclear deal is based on lies.' // 'The nuclear deal is [...]'
This is similar to the truncatewords filter found in Django.
npm i truncate-words
814
1.0.0
MIT
108 kB
6