Package Exports
- @ember/ordered-set
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ember/ordered-set) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ember-ordered-set
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.
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 withEmber.Object
- A static
length
property does not exist onOrderedSet
OrderedSet
has anisEmpty()
method- There are no
entries()
,keys()
andvalues()
methods, but there is atoArray()
method instead - The
@@iterator
symbol is not defined OrderedSet
has acopy()
method
License
ember-ordered-set is licensed under the MIT License.