UNPKG

map-tojson

Version:

ES7 Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON

25 lines (19 loc) 648 B
'use strict'; var RequireObjectCoercible = require('es-abstract/2019/RequireObjectCoercible'); var define = require('define-properties'); var callBind = require('es-abstract/helpers/callBind'); var getPolyfill = require('./polyfill'); var implementation = require('./implementation'); var shim = require('./shim'); var bound = callBind(getPolyfill()); var boundMapToJSON = function mapToJSON(map) { RequireObjectCoercible(map); return bound(map); }; define(boundMapToJSON, { getPolyfill: getPolyfill, implementation: implementation, method: implementation, // TODO: remove at semver-major shim: shim }); module.exports = boundMapToJSON;