Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
separate years, add es2016, es2017
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Dec 5, 2016
1 parent 8fc4674 commit c95759d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
18 changes: 13 additions & 5 deletions data/builtInFeatures.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// https://github.com/zloirock/core-js

module.exports = {
// es2015
// core-js/fn/map

const es2015 = {
// "es6.typed/array-buffer": "typed arrays / ",
"es6.typed.data-view": "typed arrays / DataView",
"es6.typed.int8-array": "typed arrays / Int8Array",
Expand Down Expand Up @@ -111,7 +108,18 @@ module.exports = {
"es6.math.sinh": "Math methods / Math.sinh",
"es6.math.tanh": "Math methods / Math.tanh",
"es6.math.trunc": "Math methods / Math.trunc",
};

const es2016 = {
"es7.array.includes.js": "Array.prototype.includes",
};

const es2017 = {
"es7.object.values": "Object.values",
"es7.object.entries": "Object.entries",
"es7.object.get-own-property-descriptors": "Object.getOwnPropertyDescriptors",
"es7.string.pad-start": "String padding / String.prototype.padStart",
"es7.string.pad-end": "String padding / String.prototype.padEnd"
"es7.string.pad-end": "String padding / String.prototype.padEnd",
};

module.exports = Object.assign({}, es2015, es2016, es2017);
2 changes: 2 additions & 0 deletions test/fixtures/preset-options/use-builtins-import/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ import "core-js/modules/es6.reflect.own-keys";
import "core-js/modules/es6.symbol.iterator";
import "core-js/modules/es6.symbol.species";
import "core-js/modules/es6.array.from";
import "core-js/modules/es7.string.pad-start";
import "core-js/modules/es7.string.pad-end";

1 ** 2;
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ import "core-js/modules/es6.reflect.own-keys";
import "core-js/modules/es6.symbol.iterator";
import "core-js/modules/es6.symbol.species";
import "core-js/modules/es6.array.from";
import "core-js/modules/es7.string.pad-start";
import "core-js/modules/es7.string.pad-end";

1 ** 2;
1 ** 2;
4 changes: 4 additions & 0 deletions test/fixtures/preset-options/use-builtins-require/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ require("core-js/modules/es6.symbol.species");

require("core-js/modules/es6.array.from");

require("core-js/modules/es7.string.pad-start");

require("core-js/modules/es7.string.pad-end");

1 ** 2;

0 comments on commit c95759d

Please sign in to comment.