MCPcopy Index your code
hub / github.com/ampproject/amphtml / install

Function install

src/polyfills/map-set.js:7–23  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

5 * @param {!Window} win
6 */
7export function install(win) {
8 const {Map} = win;
9 const m = new Map();
10 if (m.set(0, 0) !== m) {
11 const {set} = m;
12
13 win.Object.defineProperty(Map.prototype, 'set', {
14 enumerable: false,
15 configurable: true,
16 writable: true,
17 value: function () {
18 set.apply(this, arguments);
19 return this;
20 },
21 });
22 }
23}

Callers

nothing calls this directly

Calls 2

applyMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected