Socket
Socket
Sign inDemoInstall

lodash.isfunction

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.isfunction - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

36

index.js
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`

@@ -25,2 +25,16 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>

/**
* The base implementation of `_.isFunction` without support for environments
* with incorrect `typeof` results.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
*/
function baseIsFunction(value) {
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
// See https://github.com/jashkenas/underscore/issues/1621 for more details.
return typeof value == 'function' || false;
}
/**
* Converts `value` to a string if it is not one. An empty string is returned

@@ -89,16 +103,8 @@ * for `null` or `undefined` values.

*/
function isFunction(value) {
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
// See https://github.com/jashkenas/underscore/issues/1621 for more details.
return typeof value == 'function' || false;
}
// Fallback for environments that return incorrect `typeof` operator results.
if (isFunction(/x/) || (Uint8Array && !isFunction(Uint8Array))) {
isFunction = function(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in older versions of Chrome and Safari which return 'function' for regexes
// and Safari 8 equivalents which return 'object' for typed array constructors.
return objToString.call(value) == funcTag;
};
}
var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in older versions of Chrome and Safari which return 'function' for regexes
// and Safari 8 equivalents which return 'object' for typed array constructors.
return objToString.call(value) == funcTag;
};

@@ -105,0 +111,0 @@ /**

{
"name": "lodash.isfunction",
"version": "3.0.0",
"version": "3.0.1",
"description": "The modern build of lodash’s `_.isFunction` as a module.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/",

@@ -1,2 +0,2 @@

# lodash.isfunction v3.0.0
# lodash.isfunction v3.0.1

@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isFunction` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.

See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.isfunction) for more details.
See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.isfunction) for more details.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc