Skip to content

Files

Latest commit

05ab55a · Apr 1, 2020

History

History

set

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 10, 2019
Nov 1, 2019
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020
Apr 1, 2020

Set


MIT License

Set extensions

Table of contents

Usage

import { extend } from 'jsmodern';
import {
  difference,
  from,
  intersection,
  isDisjoint,
  isEmpty,
  isSet,
  isSubset,
  isSuperset,
  iter,
  len,
  of,
  symmetricDifference,
  toArray,
  union,
} from 'jsmodern/dist/set.js';

extend({
  set: [
    difference,
    from,
    intersection,
    isDisjoint,
    isEmpty,
    isSet,
    isSubset,
    isSuperset,
    iter,
    len,
    of,
    symmetricDifference,
    toArray,
    union,
  ],
});

console.log([
  Set.prototype.difference,
  Set.from,
  Set.prototype.intersection,
  Set.prototype.isDisjoint,
  Set.prototype.isEmpty,
  Set.isSet,
  Set.prototype.isSubset,
  Set.prototype.isSuperset,
  Set.prototype.iter,
  Set.prototype.len,
  Set.of,
  Set.prototype.symmetricDifference,
  Set.prototype.toArray,
  Set.prototype.union,
].every(n => 'function' === typeof(n)));

Available extensions

Check out API Reference.

License

MIT License © Rong Sen Ng