WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

A shim for ES6 maps. The implementation uses a JavaScript object internally, and thus keys are limited to strings.

Type parameters

  • T

Hierarchy

  • Map

Index

Methods

empty

  • empty(): boolean

entries

  • entries(): object[]

forEach

  • forEach(func: function): void
  • Calls the function for each key and value pair in the map. The 'this' context is the map itself.

    Parameters

    • func: function
        • (key: string, value: T): any
        • Parameters

          • key: string
          • value: T

          Returns any

    Returns void

get

  • get(key: string): T
  • Retrieve the value for the given key. Returns undefined if there is no value stored.

    Parameters

    • key: string

    Returns T

has

  • has(key: string): boolean

keys

  • keys(): string[]

remove

  • remove(key: string): boolean
  • Remove the value for the given key. Returns true if there was a value and false otherwise.

    Parameters

    • key: string

    Returns boolean

set

  • set(key: string, value: T): T

size

  • size(): number

values

  • values(): T[]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc