1.0.1 • Published 3 years ago

time-oset v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

time-oset

Sets in ES6 are sorted by insertion order. TimeOrderedSet is a class that extends Set with Array methods

Installation

npm i --save time-oset

Usage

Supports both ESM and CommonJS

// esm
import TimeOrderedSet from 'time-oset`
// commonjs
const TimeOrderedSet = require('time-oset').default

Array Methods

MDN Set Array

every
filter
find
findIndex
forEach
indexOf
join
lastIndexOf
map
pop
push
reduce
reduceRight
shift
splice
unshift

Set Properties and Methods

MDN Set Docs

size
clear
delete
forEach (overriden to callback with values and indexes)
has
Symbol.iterator
keys (overriden to yield indexes)
values
entries (overriden to yield indexes and values)

License

MIT