@mosmmy/shortname-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

shortname-js is a JavaScript function designed to shorten names (Portuguese - PT 🇵🇹 | BR 🇧🇷 | AO 🇦🇴) in a simple and user-friendly way. The function allows users to quickly enter full names and receive abbreviated versions of those names in return.

The MIT License Version npm npm downloads npm bundle size TypeScript Prettier Jest Coverage Status PRs Welcome GitHub stars

Install

yarn

yarn add @mosmmy/shortname-js

NPM

npm install @mosmmy/shortname-js

Use

import { shortName } from '@mosmmy/shortname-js'

console.log(shortName('Jorge Pedro André dos Santos'))          //Jorge P. A. dos Santos

console.log(shortName('Pedro de Sousa André'))                  //Pedro de S. André

console.log(shortName('Marilda dos Santos Pedro de Souza'))     //Marilda dos S. P. de Souza

console.log(shortName('Marcos Ângelo Mateus dos Santos'))       //Marcos A. M. dos Santos

To run the test:

npm run test

npm run test:**coverage**

Licence

This project is governed by the MIT. Just remember to be a nice person and send back any modifications, corrections or improvements. ✌️

Author


@moser-jose

Package Sidebar

Install

npm i @mosmmy/shortname-js

Weekly Downloads

28

Version

1.0.7

License

MIT

Unpacked Size

15.6 kB

Total Files

9

Last publish

Collaborators

  • mosmmy