@ember/ordered-set
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ember__ordered-set package

4.0.0 • Public • Published

ember-ordered-set

npm Build Status

The OrderedSet class lets you store unique values of any type, whether primitive values or object references. It is mostly similar to the native Set class introduced in ES2015.

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install @ember/ordered-set

Usage

After installing you can import OrderedSet from @ember/ordered-set:

import OrderedSet from '@ember/ordered-set';

The OrderedSet class has mostly the same API as the native Set class with a few differences:

  • The constructor does not take any arguments
  • A static create() method exists for symmetry with Ember.Object
  • A static length property does not exist on OrderedSet
  • OrderedSet has an isEmpty() method
  • There are no entries(), keys() and values() methods, but there is a toArray() method instead
  • The @@iterator symbol is not defined
  • OrderedSet has a copy() method

Contributing

See the Contributing guide for details.

License

ember-ordered-set is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @ember/ordered-set

Weekly Downloads

24,885

Version

4.0.0

License

MIT

Unpacked Size

16.4 kB

Total Files

8

Last publish

Collaborators

  • melsumner
  • rwjblue
  • stefanpenner
  • chancancode
  • tomdale
  • wycats
  • katiegengler
  • nullvoxpopuli
  • mixonic
  • ef4