UNPKG

549 BJavaScriptView Raw
1'use strict';
2var $ = require('../internals/export');
3var sameValueZero = require('../internals/same-value-zero');
4var aMap = require('../internals/a-map');
5var iterate = require('../internals/map-iterate');
6
7// `Map.prototype.includes` method
8// https://github.com/tc39/proposal-collection-methods
9$({ target: 'Map', proto: true, real: true, forced: true }, {
10 includes: function includes(searchElement) {
11 return iterate(aMap(this), function (value) {
12 if (sameValueZero(value, searchElement)) return true;
13 }, true) === true;
14 }
15});