1 var createPartial = require('../internal/createPartial');
3 /** Used to compose bitmasks for wrapper metadata. */
7 * Creates a function that invokes `func` with `partial` arguments prepended
8 * to those provided to the new function. This method is like `_.bind` except
9 * it does **not** alter the `this` binding.
11 * The `_.partial.placeholder` value, which defaults to `_` in monolithic
12 * builds, may be used as a placeholder for partially applied arguments.
14 * **Note:** This method does not set the "length" property of partially
20 * @param {Function} func The function to partially apply arguments to.
21 * @param {...*} [partials] The arguments to be partially applied.
22 * @returns {Function} Returns the new partially applied function.
25 * var greet = function(greeting, name) {
26 * return greeting + ' ' + name;
29 * var sayHelloTo = _.partial(greet, 'hello');
33 * // using placeholders
34 * var greetFred = _.partial(greet, _, 'fred');
38 var partial = createPartial(PARTIAL_FLAG);
40 // Assign default placeholders.
41 partial.placeholder = {};
43 module.exports = partial;