Package Exports
- initialism
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (initialism) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
initialism
A simple library to get initials out of words.
Installation
Install using npm for node.js:
npm install --save initialismOr yarn:
yarn add initialismUsage
// Simple usage, returns initials from all words by default
initials('Acme Incorporation')
// 'AI'
// It can be as many words
initials('Lorem ipsum dolor sit amet')
// 'LIDSA'
// Or only a single word
initials('Acme')
// 'A'
// It can take a second argument, to specify the length
initials('John Doe Jr.', 2)
// 'JD'
// It the second argument is more than the amount of words, return the maximum initials
initials('John Doe Jr.', 5)
// 'JDJ'
// If a second argument is provided but the first argument is only a single word, returns from its first letters
initials('International', 3)
// 'INT'Test
npm run testOr
yarn test