Socket
Socket
Sign inDemoInstall

lodash-compat

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-compat - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

string/startCase.js

6

chain/lodash.js

@@ -60,3 +60,3 @@ var LodashWrapper = require('../internal/LodashWrapper'),

* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, `isFinite`,
* `isFunction`, `isMatch` , `isNative`, `isNaN`, `isNull`, `isNumber`,
* `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`,

@@ -67,4 +67,4 @@ * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`,

* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`,
* `startsWith`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
* `unescape`, `uniqueId`, `value`, and `words`
* `startCase`, `startsWith`, `template`, `trim`, `trimLeft`, `trimRight`,
* `trunc`, `unescape`, `uniqueId`, `value`, and `words`
*

@@ -71,0 +71,0 @@ * The wrapper function `sample` will return a wrapped value when `n` is provided,

@@ -1,3 +0,3 @@

var find = require('./find'),
matches = require('../utility/matches');
var baseMatches = require('../internal/baseMatches'),
find = require('./find');

@@ -29,5 +29,5 @@ /**

function findWhere(collection, source) {
return find(collection, matches(source));
return find(collection, baseMatches(source));
}
module.exports = findWhere;

@@ -1,3 +0,3 @@

var map = require('./map'),
property = require('../utility/property');
var baseProperty = require('../internal/baseProperty'),
map = require('./map');

@@ -28,5 +28,5 @@ /**

function pluck(collection, key) {
return map(collection, property(key));
return map(collection, baseProperty(key + ''));
}
module.exports = pluck;

@@ -1,3 +0,3 @@

var filter = require('./filter'),
matches = require('../utility/matches');
var baseMatches = require('../internal/baseMatches'),
filter = require('./filter');

@@ -32,5 +32,5 @@ /**

function where(collection, source) {
return filter(collection, matches(source));
return filter(collection, baseMatches(source));
}
module.exports = where;

@@ -29,3 +29,3 @@ var baseMatches = require('./baseMatches'),

return type == 'object'
? baseMatches(func, !argCount)
? baseMatches(func)
: baseProperty(func + '');

@@ -32,0 +32,0 @@ }

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

var baseClone = require('./baseClone'),
baseIsMatch = require('./baseIsMatch'),
var baseIsMatch = require('./baseIsMatch'),
isStrictComparable = require('./isStrictComparable'),

@@ -18,6 +17,5 @@ keys = require('../object/keys');

* @param {Object} source The object of property values to match.
* @param {boolean} [isCloned] Specify cloning the source object.
* @returns {Function} Returns the new function.
*/
function baseMatches(source, isCloned) {
function baseMatches(source) {
var props = keys(source),

@@ -36,5 +34,2 @@ length = props.length;

}
if (isCloned) {
source = baseClone(source, true);
}
var values = Array(length),

@@ -41,0 +36,0 @@ strictCompareFlags = Array(length);

/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.

@@ -5,0 +5,0 @@ */

@@ -23,3 +23,3 @@ var isIndex = require('./isIndex'),

} else {
prereq = type == 'string' && index in value;
prereq = type == 'string' && index in object;
}

@@ -26,0 +26,0 @@ return prereq && object[index] === value;

/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.

@@ -11,2 +11,6 @@ */

*
* **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

@@ -13,0 +17,0 @@ * @param {*} value The value to check.

{
"name": "lodash-compat",
"version": "3.0.1",
"version": "3.1.0",
"description": "The compatibility build of lodash modular utilities.",

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

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

# lodash-compat v3.0.1
# lodash-compat v3.1.0

@@ -31,3 +31,3 @@ The [compatibility build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules.

See the [package source](https://github.com/lodash/lodash-compat/tree/3.0.1-npm) for more details.
See the [package source](https://github.com/lodash/lodash-compat/tree/3.1.0-npm) for more details.

@@ -34,0 +34,0 @@ **Note:**<br>

@@ -15,2 +15,3 @@ module.exports = {

'snakeCase': require('./string/snakeCase'),
'startCase': require('./string/startCase'),
'startsWith': require('./string/startsWith'),

@@ -17,0 +18,0 @@ 'template': require('./string/template'),

@@ -25,5 +25,5 @@ var createCompounder = require('../internal/createCompounder');

word = word.toLowerCase();
return index ? (result + word.charAt(0).toUpperCase() + word.slice(1)) : word;
return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
});
module.exports = camelCase;

@@ -17,6 +17,6 @@ var createCompounder = require('../internal/createCompounder');

*
* _.snakeCase('--foo-bar');
* _.snakeCase('fooBar');
* // => 'foo_bar'
*
* _.snakeCase('fooBar');
* _.snakeCase('--foo-bar');
* // => 'foo_bar'

@@ -23,0 +23,0 @@ */

@@ -38,3 +38,3 @@ var baseToString = require('../internal/baseToString'),

}
chars = baseToString(chars);
chars = (chars + '');
return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1);

@@ -41,0 +41,0 @@ }

@@ -33,5 +33,5 @@ var baseToString = require('../internal/baseToString'),

}
return string.slice(charsLeftIndex(string, baseToString(chars)));
return string.slice(charsLeftIndex(string, (chars + '')));
}
module.exports = trimLeft;

@@ -33,5 +33,5 @@ var baseToString = require('../internal/baseToString'),

}
return string.slice(0, charsRightIndex(string, baseToString(chars)) + 1);
return string.slice(0, charsRightIndex(string, (chars + '')) + 1);
}
module.exports = trimRight;
var baseCallback = require('../internal/baseCallback'),
isIterateeCall = require('../internal/isIterateeCall');
isIterateeCall = require('../internal/isIterateeCall'),
isObjectLike = require('../internal/isObjectLike'),
matches = require('./matches');

@@ -43,5 +45,7 @@ /**

}
return baseCallback(func, thisArg);
return isObjectLike(func)
? matches(func)
: baseCallback(func, thisArg);
}
module.exports = callback;

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

var baseMatches = require('../internal/baseMatches');
var baseClone = require('../internal/baseClone'),
baseMatches = require('../internal/baseMatches');

@@ -29,5 +30,5 @@ /**

function matches(source) {
return baseMatches(source, true);
return baseMatches(baseClone(source, true));
}
module.exports = matches;

Sorry, the diff of this file is too big to display

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