# @citation-js/name

> Name parser

Latest version **0.4.2** (published 2018-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @citation-js/name
pnpm add @citation-js/name
yarn add @citation-js/name
bun add @citation-js/name
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2018-12-25 |
| First published | 2018-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 20.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Lars Willighagen |
| Maintainers | larsgw |

## Links

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

## Recent versions

- 0.4.2 (latest) — 2018-12-25
- 0.4.1 — 2018-08-26
- 0.4.0 — 2018-07-23

## README

## Install

```js
npm install @citation-js/name
```

## Use

```js
let {parse, format} = require('@citation-js/name')

parse('First Last')
// { given: 'First', family: 'Last' }

format({ given: 'First', family: 'Last' })
// 'First Last'
```

### API

**`parse(String name) -> Object`**

* `String name`: Any name

**`format(Object name[, Boolean reversed]) -> String`**

* `Object name`: Any name
* `Boolean reversed`: Format as `Last, First` instead of `First Last`

---

Here, `Object` (CSL-JSON author format) has the following properties:

* `given`
* `family`
* `suffix`
* `dropping-particle`
* `non-dropping-particle`

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