Tag~Tag(paramsopt)

Class representing tag.

new Tag(paramsopt)

Create tag.

Parameters:
Name Type Attributes Description
params object <optional>

Tag parameters.

Properties
Name Type Attributes Default Description
id number <optional>
0

Tag id.

type string | TagType <optional>
TagTypes.Unknown

Tag type.

name string <optional>
""

Tag name.

count number <optional>
0

Tagged books count.

url string <optional>
""

Tag URL.

Members

types :TagTypes

Tag types.

Methods

static get(tag) → {Tag}

Warp tag object with Tag class instance.

Parameters:
Name Type Description
tag APITag | Tag

Tag to wrap.

Returns:
Tag -

Tag.

compare(tag, strictopt) → {boolean}

Compare this to given one.

Parameters:
Name Type Attributes Default Description
tag string | Tag

Tag to compare with.

strict boolean <optional>
false

Whatever all parameters must be the same.

Returns:
boolean -

Whatever tags are equal.