UNPKG

es-map

Version:

An ES-spec-compliant Map shim/polyfill/replacement that works as far down as ES3

21 lines (17 loc) 459 B
'use strict'; var implementation = require('./implementation'); var support = require('./lib/support'); module.exports = function getPolyfill() { if ( typeof Map !== 'function' || support.mapHasOldFirefoxInterface() || !support.mapCompliantConstructor() || !support.mapAcceptsArguments() || !support.mapUsesSameValueZero() || !support.mapSupportsChaining() || !support.mapIterationFinishes() ) { return implementation; } return Map; };