🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@citation-js/name

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/name

Name parser

latest
Source
npmnpm
Version
0.4.2
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 25 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts