Maker.js, a Microsoft Garage project, is a JavaScript library for creating and sharing modular line drawings for CNC and laser cutters.

View project on GitHub Star

Api - Collector Class

Collects items that share a common key.

Type parameters

  • K

  • T

Hierarchy

  • Collector

Index

Constructors

constructor

Properties

collections

collections: ICollection<K, T>[]

Methods

addItemToCollection

  • addItemToCollection(key: K, item: T): void

findCollection

  • findCollection(key: K, action?: function): T[]
  • Parameters

    • key: K
    • Optional action: function
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns T[]

getCollectionsOfMultiple

  • getCollectionsOfMultiple(cb: function): void
  • Parameters

    • cb: function
        • (key: K, items: T[]): void
        • Parameters

          • key: K
          • items: T[]

          Returns void

    Returns void

removeCollection

  • removeCollection(key: K): boolean

removeItemFromCollection

  • removeItemFromCollection(key: K, item: T): boolean

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