@liliana-sanfilippo/author-name-parser
v1.0.0
Published
A name parser implemented in TypeScript (ESNEXT) to parse names. Intended to be used for Author lists in BibTeX references.
Maintainers
Readme
Bibtex Author parser
Name parser for parsing author lists of bibtex references to allow for consistent styl. Includes the ANTLRts grammar.
Planning can be seen in the Wiki. The wiki also contains a troubleshooting guide that will be expanded as errors and problems occur.
Features
Grammar
- [x] Both formats
last, firstandfirst last - [X] Written-out names
Lilianaas well as initials with and without dotL/L.and names and initials connected with dashes - [X] Up to three first names
- [X] Regocnition of names with letter-apostroph beginning as last names e.g.
O'hara - [X] Selection of (nobility) particles e.g.
van/das - [X] Multiple unicode dashes and apostrophes and special unicode characters
- [X] Recognition of selection of arabian first name particles e.g.
ibn - [X] Works with multiple list seperators
,/;/and...
Technical
- [x] Browser support
- [x] NPM support
- [x] TypeScript Support (Typing support for TypeScript projects incl. exportable "Name" Type for TypeScript projects)
Further info
- NOT case sensitive!
USAGE
ESM
import { extractAllNames } from '@liliana-sanfilippo/author-name-parser';CommonJS
const { extractAllNames } = require('@liliana-sanfilippo/author-name-parser');Browser (UMD)
<script src="dist/umd/author-name-parser.js"></script>
<script>
const names = AuthorNameParser.extractAllNames("Max Mustermann");
</script>