Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

esnext.map.includes.js 549B

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