Skip to content

Latest commit

 

History

History

map

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