# name-initials

> A JavaScript utility library to extract initials from names.

Latest version **0.1.3** (published 2016-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install name-initials
pnpm add name-initials
yarn add name-initials
bun add name-initials
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-12-28 |
| First published | 2016-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/name-initials) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Eric Vera |
| Maintainers | ericvera |
| Keywords | initials |

## Links

- npm: https://www.npmjs.com/package/name-initials
- Repository: https://github.com/ericvera/name-initials
- Homepage: https://github.com/ericvera/name-initials#readme
- Issues: https://github.com/ericvera/name-initials/issues
- npm.io page: https://npm.io/package/name-initials

## Recent versions

- 0.1.3 (latest) — 2016-12-28
- 0.1.2 — 2016-12-16
- 0.1.1 — 2016-12-14
- 0.1.0 — 2016-12-14

## README

# name-initials
A JavaScript utility library to extract initials from names.

<p>
  <a href="https://npmjs.org/package/name-initials">
    <img src="https://img.shields.io/npm/v/name-initials.svg?style=flat-square">
  </a>
</p>

# Usage

Install the module:

```sh
npm install name-initials --save
```

### ES6
```js
import nameInitials from 'name-initials';

const initials = nameInitials('John Smith');

console.log(initials);
// Output: JS
```

### Pre-ES6
```js
var nameInitials = require('name-initials');

var initials = nameInitials('John Smith');

console.log(initials);
// Output: JS
```

# Input => Output
* E. => E
* Eric => E
* E. Vera => EV
* Eric V. => EV
* Eric A. E. => EA
* Eric A. E. Vera => EV
* Eric A. Vera => EV
* Eric A. Vera Perez => EV
* Eric Vera-Perez => EV
* Eric A. Vera-Perez => EV
* Eric Vera Perez => EV
* Eric A. de Vera Perez => ED
* Eric A. de Vera-Perez => ED
* Eric A. Perez-de Vera => EP
* Eric A. Perez de Vera => EP
* Eric (Instructor Somewhere) => E
* Éric Vera => ÉV
* Vera-Perez => VP
* Eric "No Nickname" Vera => E

# License
[MIT](https://github.com/ericvera/name-initials/blob/master/LICENSE)

---
_Source: https://npm.io/package/name-initials · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
