Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
622 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var $filter = require('../internals/array-iteration').filter;
|
---|
4 | var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');
|
---|
5 |
|
---|
6 | var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
---|
7 |
|
---|
8 | // `Array.prototype.filter` method
|
---|
9 | // https://tc39.es/ecma262/#sec-array.prototype.filter
|
---|
10 | // with adding support of @@species
|
---|
11 | $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
---|
12 | filter: function filter(callbackfn /* , thisArg */) {
|
---|
13 | return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
---|
14 | }
|
---|
15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.