Sha256: e95676c119abf1f0dcca46a026457d4b6494472b4438ac25af929f92dcb46ce4
Contents?: true
Size: 334 Bytes
Versions: 152
Compression:
Stored size: 334 Bytes
Contents
export default class Acronym { static parse(phrase: string): string { if (typeof phrase !== 'undefined' && phrase !== undefined ) { const match = phrase.match(/[A-Z]+[a-z]*|[a-z]+/g) return !match ? '' : match.reduce((acronym: string, word: string) => acronym += word[0].toUpperCase(), '') } return '' } }
Version data entries
152 entries across 152 versions & 1 rubygems