Socket
Socket
Sign inDemoInstall

lodash.sortbyorder

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.sortbyorder - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

40

index.js
/**
* lodash 3.4.0 (Custom Build) <https://lodash.com/>
* lodash 3.4.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`

@@ -15,35 +15,2 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>

/**
* Checks if `value` is object-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
return (value && typeof value == 'object') || false;
}
/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is based on ES `ToLength`. See the
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
* for more details.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
* This method is like `_.sortByAll` except that it allows specifying the

@@ -60,2 +27,3 @@ * sort orders of the property names to sort by. A truthy value in `orders`

* @param {boolean[]} orders The sort orders of `props`.
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
* @returns {Array} Returns the new sorted array.

@@ -65,5 +33,5 @@ * @example

* var users = [
* { 'user': 'barney', 'age': 26 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 26 },
* { 'user': 'fred', 'age': 30 }

@@ -70,0 +38,0 @@ * ];

2

package.json
{
"name": "lodash.sortbyorder",
"version": "3.4.0",
"version": "3.4.1",
"description": "The modern build of lodash’s `_.sortByOrder` as a module.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/",

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

# lodash.sortbyorder v3.4.0
# lodash.sortbyorder v3.4.1

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

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