Skip to content

Commit

Permalink
reuse get-built-in-prototype-method in some entries
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 18, 2023
1 parent c68c6d7 commit 3bba892
Show file tree
Hide file tree
Showing 81 changed files with 162 additions and 159 deletions.
4 changes: 2 additions & 2 deletions packages/core-js/actual/array/virtual/group-by-to-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
require('../../../modules/es.map');
require('../../../modules/es.object.to-string');
require('../../../modules/esnext.array.group-by-to-map');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').groupByToMap;
module.exports = getBuiltInPrototypeMethod('Array', 'groupByToMap');
4 changes: 2 additions & 2 deletions packages/core-js/actual/array/virtual/group-by.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/esnext.array.group-by');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').groupBy;
module.exports = getBuiltInPrototypeMethod('Array', 'groupBy');
4 changes: 2 additions & 2 deletions packages/core-js/actual/array/virtual/group-to-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
require('../../../modules/es.map');
require('../../../modules/es.object.to-string');
require('../../../modules/esnext.array.group-to-map');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').groupToMap;
module.exports = getBuiltInPrototypeMethod('Array', 'groupToMap');
4 changes: 2 additions & 2 deletions packages/core-js/actual/array/virtual/group.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/esnext.array.group');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').group;
module.exports = getBuiltInPrototypeMethod('Array', 'group');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/at.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.at');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').at;
module.exports = getBuiltInPrototypeMethod('Array', 'at');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/concat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.concat');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').concat;
module.exports = getBuiltInPrototypeMethod('Array', 'concat');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/copy-within.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.copy-within');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').copyWithin;
module.exports = getBuiltInPrototypeMethod('Array', 'copyWithin');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/entries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.iterator');
require('../../../modules/es.object.to-string');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').entries;
module.exports = getBuiltInPrototypeMethod('Array', 'entries');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/every.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.every');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').every;
module.exports = getBuiltInPrototypeMethod('Array', 'every');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/fill.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.fill');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').fill;
module.exports = getBuiltInPrototypeMethod('Array', 'fill');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/filter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.filter');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').filter;
module.exports = getBuiltInPrototypeMethod('Array', 'filter');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/find-index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.find-index');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').findIndex;
module.exports = getBuiltInPrototypeMethod('Array', 'findIndex');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/find-last-index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.find-last-index');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').findLastIndex;
module.exports = getBuiltInPrototypeMethod('Array', 'findLastIndex');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/find-last.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.find-last');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').findLast;
module.exports = getBuiltInPrototypeMethod('Array', 'findLast');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/find.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.find');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').find;
module.exports = getBuiltInPrototypeMethod('Array', 'find');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/flat-map.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.flat-map');
require('../../../modules/es.array.unscopables.flat-map');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').flatMap;
module.exports = getBuiltInPrototypeMethod('Array', 'flatMap');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/flat.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.flat');
require('../../../modules/es.array.unscopables.flat');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').flat;
module.exports = getBuiltInPrototypeMethod('Array', 'flat');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/for-each.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.for-each');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').forEach;
module.exports = getBuiltInPrototypeMethod('Array', 'forEach');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/includes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.includes');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').includes;
module.exports = getBuiltInPrototypeMethod('Array', 'includes');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/index-of.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.index-of');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').indexOf;
module.exports = getBuiltInPrototypeMethod('Array', 'indexOf');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/iterator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.iterator');
require('../../../modules/es.object.to-string');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').values;
module.exports = getBuiltInPrototypeMethod('Array', 'values');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/join.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.join');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').join;
module.exports = getBuiltInPrototypeMethod('Array', 'join');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/keys.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.iterator');
require('../../../modules/es.object.to-string');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').keys;
module.exports = getBuiltInPrototypeMethod('Array', 'keys');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/last-index-of.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.last-index-of');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').lastIndexOf;
module.exports = getBuiltInPrototypeMethod('Array', 'lastIndexOf');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/map.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.map');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').map;
module.exports = getBuiltInPrototypeMethod('Array', 'map');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/push.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.push');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').push;
module.exports = getBuiltInPrototypeMethod('Array', 'push');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/reduce-right.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.reduce-right');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').reduceRight;
module.exports = getBuiltInPrototypeMethod('Array', 'reduceRight');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/reduce.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.reduce');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').reduce;
module.exports = getBuiltInPrototypeMethod('Array', 'reduce');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/reverse.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.reverse');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').reverse;
module.exports = getBuiltInPrototypeMethod('Array', 'reverse');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/slice.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.slice');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').slice;
module.exports = getBuiltInPrototypeMethod('Array', 'slice');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/some.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.some');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').some;
module.exports = getBuiltInPrototypeMethod('Array', 'some');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/sort.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.sort');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').sort;
module.exports = getBuiltInPrototypeMethod('Array', 'sort');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/splice.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.splice');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').splice;
module.exports = getBuiltInPrototypeMethod('Array', 'splice');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/to-reversed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.to-reversed');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').toReversed;
module.exports = getBuiltInPrototypeMethod('Array', 'toReversed');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/to-sorted.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.sort');
require('../../../modules/es.array.to-sorted');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').toSorted;
module.exports = getBuiltInPrototypeMethod('Array', 'toSorted');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/to-spliced.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.to-spliced');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').toSpliced;
module.exports = getBuiltInPrototypeMethod('Array', 'toSpliced');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/unshift.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.unshift');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').unshift;
module.exports = getBuiltInPrototypeMethod('Array', 'unshift');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/values.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
require('../../../modules/es.array.iterator');
require('../../../modules/es.object.to-string');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array').values;
module.exports = getBuiltInPrototypeMethod('Array', 'values');
4 changes: 2 additions & 2 deletions packages/core-js/es/array/virtual/with.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.array.with');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Array')['with'];
module.exports = getBuiltInPrototypeMethod('Array', 'with');
4 changes: 2 additions & 2 deletions packages/core-js/es/function/virtual/bind.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.function.bind');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Function').bind;
module.exports = getBuiltInPrototypeMethod('Function', 'bind');
4 changes: 2 additions & 2 deletions packages/core-js/es/number/virtual/to-exponential.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.number.to-exponential');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Number').toExponential;
module.exports = getBuiltInPrototypeMethod('Number', 'toExponential');
4 changes: 2 additions & 2 deletions packages/core-js/es/number/virtual/to-fixed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.number.to-fixed');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Number').toFixed;
module.exports = getBuiltInPrototypeMethod('Number', 'toFixed');
4 changes: 2 additions & 2 deletions packages/core-js/es/number/virtual/to-precision.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.number.to-precision');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('Number').toPrecision;
module.exports = getBuiltInPrototypeMethod('Number', 'toPrecision');
4 changes: 2 additions & 2 deletions packages/core-js/es/string/virtual/anchor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.string.anchor');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('String').anchor;
module.exports = getBuiltInPrototypeMethod('String', 'anchor');
4 changes: 2 additions & 2 deletions packages/core-js/es/string/virtual/at.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.string.at-alternative');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('String').at;
module.exports = getBuiltInPrototypeMethod('String', 'at');
4 changes: 2 additions & 2 deletions packages/core-js/es/string/virtual/big.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.string.big');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('String').big;
module.exports = getBuiltInPrototypeMethod('String', 'big');
4 changes: 2 additions & 2 deletions packages/core-js/es/string/virtual/blink.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.string.blink');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('String').blink;
module.exports = getBuiltInPrototypeMethod('String', 'blink');
4 changes: 2 additions & 2 deletions packages/core-js/es/string/virtual/bold.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../../../modules/es.string.bold');
var entryVirtual = require('../../../internals/entry-virtual');
var getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');

module.exports = entryVirtual('String').bold;
module.exports = getBuiltInPrototypeMethod('String', 'bold');
Loading

0 comments on commit 3bba892

Please sign in to comment.