Components Interactions Examples Tutorials API FAQ
Options
Menu

Interface Set

A shim for ES6 sets. Is only able to store strings.

Hierarchy

  • Set

Index

Methods

add

  • add(value: string): string
  • Add the string to this set. Returns the value.

    Parameters

    • value: string

    Returns string

empty

  • empty(): boolean

forEach

  • forEach(func: function): void
  • Calls a given function for each value in the set. The return value of the function is ignored. The this context of the function is the set itself.

    Parameters

    • func: function
        • (value: string): any
        • Parameters

          • value: string

          Returns any

    Returns void

has

  • has(value: string): boolean
  • Is the given string stored in this set?

    Parameters

    • value: string

    Returns boolean

remove

  • remove(value: string): boolean
  • Remove the given value from the set. Returns true if it was stored, and false otherwise.

    Parameters

    • value: string

    Returns boolean

size

  • size(): number

values

  • values(): string[]

Generated using TypeDoc