lodash._basecreatecallback
Advanced tools
Comparing version 2.2.1 to 2.3.0
32
index.js
/** | ||
* Lo-Dash 2.2.1 (Custom Build) <http://lodash.com/> | ||
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/> | ||
* Build: `lodash modularize modern exports="npm" -o ./npm/` | ||
@@ -15,3 +15,3 @@ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | ||
/** Used to detected named functions */ | ||
var reFuncName = /^function[ \n\r\t]+\w/; | ||
var reFuncName = /^\s*function[ \n\r\t]+\w/; | ||
@@ -38,20 +38,26 @@ /** Used to detect functions containing a `this` reference */ | ||
} | ||
// exit early if there is no `thisArg` | ||
if (typeof thisArg == 'undefined') { | ||
// exit early for no `thisArg` or already bound by `Function#bind` | ||
if (typeof thisArg == 'undefined' || !('prototype' in func)) { | ||
return func; | ||
} | ||
var bindData = func.__bindData__ || (support.funcNames && !func.name); | ||
var bindData = func.__bindData__; | ||
if (typeof bindData == 'undefined') { | ||
var source = reThis && fnToString.call(func); | ||
if (!support.funcNames && source && !reFuncName.test(source)) { | ||
bindData = true; | ||
if (support.funcNames) { | ||
bindData = !func.name; | ||
} | ||
if (support.funcNames || !bindData) { | ||
// checks if `func` references the `this` keyword and stores the result | ||
bindData = !support.funcDecomp || reThis.test(source); | ||
setBindData(func, bindData); | ||
bindData = bindData || !support.funcDecomp; | ||
if (!bindData) { | ||
var source = fnToString.call(func); | ||
if (!support.funcNames) { | ||
bindData = !reFuncName.test(source); | ||
} | ||
if (!bindData) { | ||
// checks if `func` references the `this` keyword and stores the result | ||
bindData = reThis.test(source); | ||
setBindData(func, bindData); | ||
} | ||
} | ||
} | ||
// exit early if there are no `this` references or `func` is bound | ||
if (bindData !== true && (bindData && bindData[1] & 1)) { | ||
if (bindData === false || (bindData !== true && bindData[1] & 1)) { | ||
return func; | ||
@@ -58,0 +64,0 @@ } |
{ | ||
"name": "lodash._basecreatecallback", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "The internal Lo-Dash function `baseCreateCallback` as a Node.js module generated by lodash-cli.", | ||
@@ -10,3 +10,3 @@ "homepage": "http://lodash.com/custom-builds", | ||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)", | ||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)", | ||
@@ -18,7 +18,7 @@ "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)" | ||
"dependencies": { | ||
"lodash.bind": "~2.2.1", | ||
"lodash.identity": "~2.2.1", | ||
"lodash._setbinddata": "~2.2.1", | ||
"lodash.support": "~2.2.1" | ||
"lodash.bind": "~2.3.0", | ||
"lodash.identity": "~2.3.0", | ||
"lodash._setbinddata": "~2.3.0", | ||
"lodash.support": "~2.3.0" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash._basecreatecallback v2.2.1 | ||
# lodash._basecreatecallback v2.3.0 | ||
@@ -7,3 +7,3 @@ The internal [Lo-Dash](http://lodash.com/) function `baseCreateCallback` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). | ||
| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | | ||
| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | | ||
|---| | ||
@@ -14,4 +14,4 @@ | [John-David Dalton](http://allyoucanleet.com/) | | ||
| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | | ||
| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | | ||
|---|---|---| | ||
| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) | | ||
| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6003
75
+ Addedlodash._basebind@2.3.0(transitive)
+ Addedlodash._basecreate@2.3.0(transitive)
+ Addedlodash._basecreatewrapper@2.3.0(transitive)
+ Addedlodash._createwrapper@2.3.0(transitive)
+ Addedlodash._objecttypes@2.3.0(transitive)
+ Addedlodash._renative@2.3.0(transitive)
+ Addedlodash._setbinddata@2.3.0(transitive)
+ Addedlodash._slice@2.3.0(transitive)
+ Addedlodash.bind@2.3.0(transitive)
+ Addedlodash.identity@2.3.0(transitive)
+ Addedlodash.isfunction@2.3.0(transitive)
+ Addedlodash.isobject@2.3.0(transitive)
+ Addedlodash.noop@2.3.0(transitive)
+ Addedlodash.support@2.3.0(transitive)
- Removedlodash._createbound@2.2.1(transitive)
- Removedlodash._createobject@2.2.1(transitive)
- Removedlodash._noop@2.2.1(transitive)
- Removedlodash._objecttypes@2.2.1(transitive)
- Removedlodash._renative@2.2.1(transitive)
- Removedlodash._setbinddata@2.2.1(transitive)
- Removedlodash.bind@2.2.1(transitive)
- Removedlodash.identity@2.2.1(transitive)
- Removedlodash.isfunction@2.2.1(transitive)
- Removedlodash.isobject@2.2.1(transitive)
- Removedlodash.support@2.2.1(transitive)
Updatedlodash._setbinddata@~2.3.0
Updatedlodash.bind@~2.3.0
Updatedlodash.identity@~2.3.0
Updatedlodash.support@~2.3.0