Namespace: util

@citation-js/core.plugins.input.util

Classes

DataParser
FormatParser
TypeParser

Methods

(protected, static) applyGraph(entry, graph) → {module:@citation-js/core~CSL}

Apply a parse chain graph to an element

Parameters:
Name Type Description
entry module:@citation-js/core~CSL
graph Array.<Object>
Source:
Returns:

entry

Type
module:@citation-js/core~CSL

(protected, static) clean(data, bestGuessConversionsopt) → {Array.<module:@citation-js/core~CSL>}

Make CSL JSON conform to standards so that plugins don't have to typecheck all the time.

Parameters:
Name Type Attributes Default Description
data Array.<module:@citation-js/core~CSL>

Array of CSL

bestGuessConversions Boolean <optional>
true

make some best guess conversions on type mismatch

Source:
Returns:

Array of clean CSL

Type
Array.<module:@citation-js/core~CSL>

(static) dataTypeOf(thing) → {module:@citation-js/core.plugins.input~dataType}

Parameters:
Name Type Description
thing *

input data or anything else

Source:
Returns:

dataType

Type
module:@citation-js/core.plugins.input~dataType

(protected, static) removeGraph(entry) → {module:@citation-js/core~CSL}

Remove the parse chain graph from an element

Parameters:
Name Type Description
entry module:@citation-js/core~CSL
Source:
Returns:

entry

Type
module:@citation-js/core~CSL

(static) typeOf(thing) → {String}

Gets the constructor name, with a special case for null and undefined

Parameters:
Name Type Description
thing *

input data or anything else

Source:
Returns:

type

Type
String