Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.bind

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.bind - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

LICENSE

44

index.js
/**
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var createWrapper = require('lodash._createwrapper'),
replaceHolders = require('lodash._replaceholders'),
restParam = require('lodash.restparam');
rest = require('lodash.rest');

@@ -17,3 +16,30 @@ /** Used to compose bitmasks for wrapper metadata. */

/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/**
* Replaces all `placeholder` elements in `array` with an internal placeholder
* and returns an array of their indexes.
*
* @private
* @param {Array} array The array to modify.
* @param {*} placeholder The placeholder to replace.
* @returns {Array} Returns the new array of placeholder indexes.
*/
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = -1,
result = [];
while (++index < length) {
if (array[index] === placeholder) {
array[index] = PLACEHOLDER;
result[++resIndex] = index;
}
}
return result;
}
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`

@@ -26,3 +52,3 @@ * and prepends any additional `_.bind` arguments to those provided to the

*
* **Note:** Unlike native `Function#bind` this method does not set the `length`
* **Note:** Unlike native `Function#bind` this method doesn't set the "length"
* property of bound functions.

@@ -54,3 +80,3 @@ *

*/
var bind = restParam(function(func, thisArg, partials) {
var bind = rest(function(func, thisArg, partials) {
var bitmask = BIND_FLAG;

@@ -57,0 +83,0 @@ if (partials.length) {

{
"name": "lodash.bind",
"version": "3.1.0",
"description": "The modern build of lodash’s `_.bind` as a module.",
"version": "4.0.0",
"description": "The lodash method `_.bind` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"keywords": "lodash, lodash-modularized, stdlib, util",
"keywords": "lodash, lodash-modularized, stdlib, util, bind",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"

@@ -21,5 +19,4 @@ ],

"lodash._createwrapper": "^3.0.0",
"lodash._replaceholders": "^3.0.0",
"lodash.restparam": "^3.0.0"
"lodash.rest": "^4.0.0"
}
}

@@ -1,4 +0,4 @@

# lodash.bind v3.1.0
# lodash.bind v4.0.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bind` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
The [lodash](https://lodash.com/) method `_.bind` exported as a [Node.js](https://nodejs.org/) module.

@@ -8,3 +8,2 @@ ## Installation

Using npm:
```bash

@@ -15,4 +14,3 @@ $ {sudo -H} npm i -g npm

In Node.js/io.js:
In Node.js:
```js

@@ -22,2 +20,2 @@ var bind = require('lodash.bind');

See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bind) for more details.
See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.bind) 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