@citation-js/name
v0.4.2
Published
Name parser
Downloads
77,992
Readme
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 nameBoolean reversed
: Format asLast, First
instead ofFirst Last
Here, Object
(CSL-JSON author format) has the following properties:
given
family
suffix
dropping-particle
non-dropping-particle