Socket
Socket
Sign inDemoInstall

lodash.sortby

Package Overview
Dependencies
6
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.0 to 4.2.1

23

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

@@ -45,5 +45,5 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

/**
* The base implementation of `_.sortBy` which uses `comparer` to define
* the sort order of `array` and replaces criteria objects with their
* corresponding values.
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*

@@ -189,9 +189,5 @@ * @private

function baseOrderBy(collection, iteratees, orders) {
var index = -1,
toIteratee = baseIteratee;
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : Array(1), baseIteratee);
iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) {
return toIteratee(iteratee);
});
var result = baseMap(collection, function(value, key, collection) {

@@ -361,4 +357,3 @@ var criteria = arrayMap(iteratees, function(iteratee) {

function isArrayLike(value) {
return value != null &&
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
return value != null && isLength(getLength(value)) && !isFunction(value);
}

@@ -384,4 +379,4 @@

// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';

@@ -388,0 +383,0 @@ return tag == funcTag || tag == genTag;

{
"name": "lodash.sortby",
"version": "4.2.0",
"version": "4.2.1",
"description": "The lodash method `_.sortBy` exported as a module.",

@@ -12,3 +12,3 @@ "homepage": "https://lodash.com/",

"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"

@@ -15,0 +15,0 @@ ],

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

# lodash.sortby v4.2.0
# lodash.sortby v4.2.1

@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.sortBy` exported as a [Node.js](https://nodejs.org/) module.

See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sortby) for more details.
See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sortby) for more details.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc