Socket
Socket
Sign inDemoInstall

lodash.partialright

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.partialright - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

34

index.js
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* 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.7.0 <http://underscorejs.org/LICENSE>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var baseSlice = require('lodash._baseslice'),
createWrapper = require('lodash._createwrapper'),
replaceHolders = require('lodash._replaceholders');
var createWrapper = require('lodash._createwrapper'),
replaceHolders = require('lodash._replaceholders'),
restParam = require('lodash.restparam');

@@ -17,2 +17,17 @@ /** Used to compose bitmasks for wrapper metadata. */

/**
* Creates a `_.partial` or `_.partialRight` function.
*
* @private
* @param {boolean} flag The partial bit flag.
* @returns {Function} Returns the new partial function.
*/
function createPartial(flag) {
var partialFunc = restParam(function(func, partials) {
var holders = replaceHolders(partials, partialFunc.placeholder);
return createWrapper(func, flag, null, partials, holders);
});
return partialFunc;
}
/**
* This method is like `_.partial` except that partially applied arguments

@@ -31,3 +46,3 @@ * are appended to those provided to the new function.

* @param {Function} func The function to partially apply arguments to.
* @param {...*} [args] The arguments to be partially applied.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.

@@ -49,9 +64,4 @@ * @example

*/
function partialRight(func) {
var partials = baseSlice(arguments, 1),
holders = replaceHolders(partials, partialRight.placeholder);
var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
return createWrapper(func, PARTIAL_RIGHT_FLAG, null, partials, holders);
}
// Assign default placeholders.

@@ -58,0 +68,0 @@ partialRight.placeholder = {};

Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>

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

{
"name": "lodash.partialright",
"version": "3.0.0",
"version": "3.1.0",
"description": "The modern build of lodash’s `_.partialRight` as a module.",

@@ -20,6 +20,6 @@ "homepage": "https://lodash.com/",

"dependencies": {
"lodash._baseslice": "^3.0.0",
"lodash._createwrapper": "^3.0.0",
"lodash._replaceholders": "^3.0.0"
"lodash._replaceholders": "^3.0.0",
"lodash.restparam": "^3.0.0"
}
}

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

# lodash.partialright v3.0.0
# lodash.partialright v3.1.0

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

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