From af131e824112032e44e46b41e7464cf4b267b883 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Fri, 16 Feb 2018 17:25:42 +0700 Subject: [PATCH] add missed `features/object/to-string` entry point --- packages/core-js/features/object/to-string.js | 6 ++++++ tests/commonjs.js | 1 + 2 files changed, 7 insertions(+) create mode 100644 packages/core-js/features/object/to-string.js diff --git a/packages/core-js/features/object/to-string.js b/packages/core-js/features/object/to-string.js new file mode 100644 index 000000000000..8ce2a175ab88 --- /dev/null +++ b/packages/core-js/features/object/to-string.js @@ -0,0 +1,6 @@ +require('../../modules/es.object.to-string'); +var classof = require('../../internals/classof'); + +module.exports = function (it) { + return '[object ' + classof(it) + ']'; +}; diff --git a/tests/commonjs.js b/tests/commonjs.js index c3427fab04a2..609fff181ebe 100644 --- a/tests/commonjs.js +++ b/tests/commonjs.js @@ -28,6 +28,7 @@ for (const _PATH of ['../packages/core-js-pure', '../packages/core-js']) { ok(load('features/object/prevent-extensions')({})); ok(load('features/object/seal')({})); ok(load('features/object/set-prototype-of')({}, []) instanceof Array); + ok(load('features/object/to-string')([]) === '[object Array]'); ok(load('features/object/entries')({ q: 2 })[0][0] === 'q'); ok(load('features/object/values')({ q: 2 })[0] === 2); ok(load('features/object/get-own-property-descriptors')({ q: 1 }).q.enumerable);