Rename toString to objToString.

This commit is contained in:
John-David Dalton
2015-01-16 14:19:52 -08:00
committed by jdalton
parent 23c2dd33f2
commit d2e50b09db

View File

@@ -47,11 +47,11 @@
hasOwnProperty = objectProto.hasOwnProperty, hasOwnProperty = objectProto.hasOwnProperty,
JSON = root.JSON, JSON = root.JSON,
noop = function() {}, noop = function() {},
objToString = objectProto.toString,
params = root.arguments, params = root.arguments,
push = arrayProto.push, push = arrayProto.push,
slice = arrayProto.slice, slice = arrayProto.slice,
system = root.system, system = root.system,
toString = objectProto.toString,
Uint8Array = root.Uint8Array; Uint8Array = root.Uint8Array;
/** Used to set property descriptors. */ /** Used to set property descriptors. */
@@ -7008,7 +7008,7 @@
test('should return `true` for typed array constructors', 1, function() { test('should return `true` for typed array constructors', 1, function() {
var expected = _.map(typedArrays, function(type) { var expected = _.map(typedArrays, function(type) {
return toString.call(root[type]) == funcTag; return objToString.call(root[type]) == funcTag;
}); });
var actual = _.map(typedArrays, function(type) { var actual = _.map(typedArrays, function(type) {
@@ -7056,7 +7056,7 @@
}, { }, {
'prototype': { 'prototype': {
'toString': _.assign(function() { 'toString': _.assign(function() {
return _.has(this, '@@toStringTag') ? this['@@toStringTag'] : toString.call(this); return _.has(this, '@@toStringTag') ? this['@@toStringTag'] : objToString.call(this);
}, { }, {
'toString': function() { 'toString': function() {
return String(toString); return String(toString);
@@ -7074,7 +7074,7 @@
strictEqual(lodash.isFunction(slice), true); strictEqual(lodash.isFunction(slice), true);
strictEqual(lodash.isFunction(/x/), false); strictEqual(lodash.isFunction(/x/), false);
strictEqual(lodash.isFunction(Uint8Array), toString.call(Uint8Array) == funcTag); strictEqual(lodash.isFunction(Uint8Array), objToString.call(Uint8Array) == funcTag);
} }
else { else {
skipTest(3); skipTest(3);
@@ -7902,7 +7902,7 @@
Foo.prototype = root[methodName.slice(2)].prototype; Foo.prototype = root[methodName.slice(2)].prototype;
var object = new Foo; var object = new Foo;
if (toString.call(object) == objectTag) { if (objToString.call(object) == objectTag) {
strictEqual(_[methodName](object), false, '`_.' + methodName + '` returns `false`'); strictEqual(_[methodName](object), false, '`_.' + methodName + '` returns `false`');
} else { } else {
skipTest(); skipTest();