- Source:
Namespaces
Members
(static, constant) exports.bibjson
- Deprecated:
- now part of the module:input/bibjson module
- Source:
Methods
(protected, static) chain(input, optionsopt) → {Array.<CSL>}
Parse input until success.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
InputData
|
input data |
|
options |
Cite~InputOptions
|
<optional> |
options |
(protected, static) chainAsync(input, optionsopt) → {Promise.<Array.<CSL>>}
Parse input until success. (async)
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
InputData
|
input data |
|
options |
Cite~InputOptions
|
<optional> |
options |
(protected, static) chainLink(input) → {Array.<CSL>}
Parse input once.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
input |
InputData
|
input data |
(protected, static) chainLinkAsync(input) → {Promise}
Parse input once. (async)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
input |
InputData
|
The input data |
Returns:
- Type:
-
Promise
The parsed input
(protected, static) parseCsl(data) → {Array.<CSL>}
Make CSL JSON conform to standards so that plugins don't have to typecheck all the time.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<CSL>
|
Array of CSL |
(protected, static) parseDate(value) → {Object|Object}
Convert date to CSL date. Supported formats:
- Epoch time (in number form)
YYYY-MM-DD
[+-]YYYYYY[Y...]-MM-DD
[DDD, ]DD MMM YYYY
M[M]/D[D]/YY[YY] (1)
D[D] M[M] Y[Y...] (2, 1)
[-]Y[Y...] M[M] D[D] (2)
D[D] MMM Y[Y...] (2)
[-]Y[Y...] MMM D[D] (2)
M[M] [-]Y[Y...] (3, 5)
[-]Y[Y...] M[M] (3, 4, 5)
MMM [-]Y[Y...] (3, 5)
[-]Y[Y...] MMM (3, 5)
[-]Y[Y...] (5)
Generally, formats support trailing parts, which are disregarded.
- When the former of these formats overlaps with the latter, the former is preferred
- " ", ".", "-" and "/" are all supported as separator
- Any sequence of non-alphanumerical characters are supported as separator
- This format is only assumed if the year is bigger than the month
- This format doesn't support trailing parts
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
Number
|
String
|
date in supported format, see above |
Returns:
-
- Type:
-
Object
Object with property "date-parts" with the value [[ YYYY, MM, DD ]]
-
- Type:
-
Object
If unparsable, object with property "raw" with the inputted value
(protected, static) parseName(name) → {Object}
Get CSL from name
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
string |
Returns:
- Type:
-
Object
The CSL object