Skip to content

emberjs/ember-ordered-set

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ab36bf · Jul 20, 2022

History

98 Commits
Jun 1, 2018
Nov 2, 2020
Oct 24, 2020
Oct 9, 2020
Nov 5, 2017
Nov 11, 2019
Oct 9, 2020
Nov 11, 2019
Nov 11, 2019
Oct 9, 2020
Nov 2, 2020
Nov 5, 2017
Oct 28, 2020
Nov 11, 2019
Jan 14, 2022
Nov 2, 2020
Oct 9, 2020
Oct 24, 2020
Nov 13, 2018
Oct 28, 2020
Oct 9, 2020
Jul 20, 2022

Repository files navigation

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.8 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.