Note This repository is
Small tool that parses a string of text containing APA style in text citations, e.g. Jones (2020), and returns a rudimentary AST with the thing parsed.
Not very efficient at all, just uses regex so don't run it on big pieces of text at once. To be used inside other more mature parsers in order to check whether what we are looking at is a citation. automatically generated from the main parser monorepo. Please submit any issues or pull requests there.
This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install as
pnpm add parse-text-cite
# or with yarn
# yarn add parse-text-cite
# or with npm
# npm install parse-text-cite
parseTextCite(string: string, options?: Options): (string | Citation)[] | (string | Citation)[][];
Name | Type |
---|---|
string |
string |
options? |
Options |
(string
| Citation
)[] | (string
| Citation
)[][]
Defined in: lib/parse-text-cite.ts:34
Const
Parser
Defined in: lib/parse-text-cite.ts:32
string
Defined in: lib/parse-text-cite.ts:6
Defined in: lib/parse-text-cite.ts:7
string
Defined in: lib/parse-text-cite.ts:9
Defined in: lib/parse-text-cite.ts:8
string
Defined in: lib/parse-text-cite.ts:19
string
Defined in: lib/parse-text-cite.ts:22
Data
Defined in: lib/parse-text-cite.ts:18
string
Defined in: lib/parse-text-cite.ts:23
string
Defined in: lib/parse-text-cite.ts:24
string
Defined in: lib/parse-text-cite.ts:20
string
Defined in: lib/parse-text-cite.ts:21
string
Defined in: lib/parse-text-cite.ts:14
number
Defined in: lib/parse-text-cite.ts:13
GPL-3.0-or-later © Thomas F. K. Jorna