@citation-js/name

0.4.2 • Public • Published

Install

npm install @citation-js/name

Use

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.2
    14,502
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.4.2
    14,502
  • 0.4.1
    0
  • 0.4.0
    0

Package Sidebar

Install

npm i @citation-js/name

Weekly Downloads

12,542

Version

0.4.2

License

MIT

Unpacked Size

20.8 kB

Total Files

6

Last publish

Collaborators

  • larsgw