Skip to content

Latest commit

 

History

History
72 lines (45 loc) · 1.6 KB

Vocabulary.md

File metadata and controls

72 lines (45 loc) · 1.6 KB

Vocabulary

new Vocabulary(terms)

Param Type
terms Array | Set

vocabulary.size : number

Vocabulary size

vocabulary.terms : Array | Set

Vocabulary terms

vocabulary.add(terms) ⇒ this

Add one or more terms to the vocabulary

Param Type
terms string | Array | Set

vocabulary.remove(terms) ⇒ this

Remove one or more terms from the vocabulary

Param Type
terms string | Array | Set

vocabulary.has(term) ⇒ bool

Return whether the vocabulary contains a certain term

Param Type
term string

vocabulary.indexOf(term) ⇒ number

Return the index of a term in the vocabulary (returns -1 if not found)

Param Type
term string