Namespace: util

@citation-js/core.util

Classes

Grammar
Register
TokenStack
Translator

Methods

(protected, static) deepCopy(obj, seenopt) → {Object}

Duplicate objects to prevent Cite changing values outside of own scope

Parameters:
Name Type Attributes Description
obj Object

Input object

seen Set <optional>
Source:
Throws:
TypeError
Returns:

Duplicated object

Type
Object

(protected, static) fetchFile(url, optsopt) → {String}

Fetch file

Parameters:
Name Type Attributes Description
url String

The input url

opts module:@citation-js/core.util.fetchFile~options <optional>

Request options

Source:
Returns:

The fetched string

Type
String

(protected, static) fetchFileAsync(url, optsopt) → {Promise.<String>}

Fetch file (async)

Parameters:
Name Type Attributes Description
url String

The input url

opts module:@citation-js/core.util.fetchFile~options <optional>

Request options

Source:
Returns:

The fetched string

Type
Promise.<String>

(protected, static) fetchId(list, prefix) → {String}

Generate ID

Parameters:
Name Type Description
list Array.<String>

old ID list

prefix String

ID prefix

Source:
Returns:

CSL ID

Type
String

(protected, static) setUserAgent(url, optsopt)

Fetch file (async)

Parameters:
Name Type Attributes Description
url String

The input url

opts module:@citation-js/core.util.fetchFile~options <optional>

Request options

Source: