Fix _.isFunction and _.isNative for Safari 8.

This commit is contained in:
John-David Dalton
2014-11-08 02:26:18 -08:00
parent f5682397c2
commit 404e658a5d
2 changed files with 16 additions and 3 deletions

View File

@@ -6464,6 +6464,19 @@
strictEqual(_.isFunction(slice), true);
});
test('should return `true` for typed array constructors', 1, function() {
var expected = _.map(typedArrays, function(type) {
return toString.call(root[type]) == '[object Function]';
});
var actual = _.map(typedArrays, function(type) {
var Ctor = root[type];
return Ctor ? _.isFunction(Ctor) : false;
});
deepEqual(actual, expected);
});
test('should return `false` for non functions', 11, function() {
var expected = _.map(falsey, _.constant(false));