Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add missed features/object/to-string entry point
Browse files Browse the repository at this point in the history
zloirock committed Apr 9, 2018
1 parent eedd6f0 commit b0941dd
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core-js/features/object/to-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require('../../modules/es.object.to-string');
var classof = require('../../internals/classof');

module.exports = function (it) {
return '[object ' + classof(it) + ']';
};
1 change: 1 addition & 0 deletions tests/commonjs.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit b0941dd

Please sign in to comment.