Skip to content

Files

Latest commit

05ab55a · Apr 1, 2020

History

History

map

Folders and files

NameName
Last commit message
Last commit date

parent directory

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

Map


MIT License

Map extensions

Table of contents

Usage

import { extend } from 'jsmodern';
import {
  entry,
  entryOrDefault,
  from,
  getOrDefault,
  isEmpty,
  isMap,
  iter,
  len,
  of,
  removeEntry,
  toArray,
} from 'jsmodern/dist/map.js';

extend({
  map: [
    entry,
    entryOrDefault,
    from,
    getOrDefault,
    isEmpty,
    isMap,
    iter,
    len,
    of,
    removeEntry,
    toArray,
  ],
});

console.log([
  Map.prototype.entry,
  Map.prototype.entryOrDefault,
  Map.from,
  Map.prototype.getOrDefault,
  Map.prototype.isEmpty,
  Map.isMap,
  Map.prototype.iter,
  Map.prototype.len,
  Map.of,
  Map.prototype.removeEntry,
  Map.prototype.toArray,
].every(n => 'function' === typeof(n)));

Available extensions

Check out API Reference.

License

MIT License © Rong Sen Ng