abbreviate
abbreviate strings in style of
R: Abbreviate
Install
npm install --save abbreviate
Usage
abbreviate = require('abbreviate')
abbr = abbreviate('Some Important String', {length: 8})
What it does
In this order:
- trims the string
- removes word separators (
/\s\-_,/
) (unless keepSeparators is true)
- removes lowercase vocals
- removes lowercase consonants
- removes uppercase vocals
- removes uppercase consonants and numbers
- removes word beginnings (looks for digraphs, trigraphs and blends)
License
Copyright (c) 2015 Paul Pflugradt
Licensed under the MIT license.