diff --git a/index.js b/index.js index 4767a2f..ff97c9c 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,14 @@ require("core-js/es6/object"); require("core-js/es6/array"); require("core-js/es6/string"); require("core-js/es6/function"); +require("core-js/fn/array/includes"); +require("core-js/fn/object/values"); +require("core-js/fn/object/entries"); +require("core-js/fn/object/get-own-property-descriptors"); +require("core-js/fn/string/pad-start"); +require("core-js/fn/string/pad-end"); +require("core-js/fn/string/trim-start"); +require("core-js/fn/string/trim-end"); Symbol = exports.Symbol = global.Symbol || require("core-js/es6/symbol"); diff --git a/package.json b/package.json index f9b12b8..30fb558 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "license": "MIT", "dependencies": { - "core-js": "1.2.1" + "core-js": "2.4.1" }, "devDependencies": { "mocha": "~3.0.2" diff --git a/test/tests.js b/test/tests.js index 184ba08..6972214 100644 --- a/test/tests.js +++ b/test/tests.js @@ -6,6 +6,9 @@ function runTests(runtime) { assert.strictEqual(typeof Object.is, "function"); assert.strictEqual(typeof Object.setPrototypeOf, "function"); assert.strictEqual(typeof Object.getPrototypeOf, "function"); + assert.strictEqual(typeof Object.entries, "function"); + assert.strictEqual(typeof Object.values, "function"); + assert.strictEqual(typeof Object.getOwnPropertyDescriptors, "function"); }); it("String has appropriate prototype methods", function () { @@ -13,6 +16,12 @@ function runTests(runtime) { assert.strictEqual(typeof "asdf".endsWith, "function"); assert.strictEqual(typeof "asdf".repeat, "function"); assert.strictEqual(typeof "asdf".trim, "function"); + assert.strictEqual(typeof "asdf".padStart, "function"); + assert.strictEqual(typeof "asdf".padEnd, "function"); + assert.strictEqual(typeof "asdf".trimStart, "function"); + assert.strictEqual(typeof "asdf".trimEnd, "function"); + assert.strictEqual(typeof "asdf".trimLeft, "function"); + assert.strictEqual(typeof "asdf".trimRight, "function"); }); it("Symbol basically works", function () { @@ -82,6 +91,7 @@ function runTests(runtime) { assert.strictEqual([2, 3, 4].find(isOdd), 3); assert.strictEqual([2, 3, 4].findIndex(isOdd), 1); + assert.strictEqual([2, 3, 4].includes(3), true); }); }