summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/bindKey.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/bindKey.js')
-rw-r--r--tools/eslint/node_modules/lodash/bindKey.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/eslint/node_modules/lodash/bindKey.js b/tools/eslint/node_modules/lodash/bindKey.js
index 5cefad3ed8..364dd69812 100644
--- a/tools/eslint/node_modules/lodash/bindKey.js
+++ b/tools/eslint/node_modules/lodash/bindKey.js
@@ -1,4 +1,5 @@
var createWrapper = require('./_createWrapper'),
+ getPlaceholder = require('./_getPlaceholder'),
replaceHolders = require('./_replaceHolders'),
rest = require('./rest');
@@ -8,12 +9,12 @@ var BIND_FLAG = 1,
PARTIAL_FLAG = 32;
/**
- * Creates a function that invokes the method at `object[key]` and prepends
- * any additional `_.bindKey` arguments to those provided to the bound function.
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
*
* This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
@@ -21,6 +22,7 @@ var BIND_FLAG = 1,
*
* @static
* @memberOf _
+ * @since 0.10.0
* @category Function
* @param {Object} object The object to invoke the method on.
* @param {string} key The key of the method.
@@ -54,9 +56,7 @@ var BIND_FLAG = 1,
var bindKey = rest(function(object, key, partials) {
var bitmask = BIND_FLAG | BIND_KEY_FLAG;
if (partials.length) {
- var placeholder = bindKey.placeholder,
- holders = replaceHolders(partials, placeholder);
-
+ var holders = replaceHolders(partials, getPlaceholder(bindKey));
bitmask |= PARTIAL_FLAG;
}
return createWrapper(key, bitmask, object, partials, holders);