Map extensions
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)));
Check out API Reference.
MIT License © Rong Sen Ng