Socket
Socket
Sign inDemoInstall

lodash.template

Package Overview
Dependencies
6
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.1 to 4.2.0

42

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

@@ -9,4 +9,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

*/
var arrayMap = require('lodash._arraymap'),
assignInWith = require('lodash.assigninwith'),
var assignInWith = require('lodash.assigninwith'),
keys = require('lodash.keys'),

@@ -75,2 +74,22 @@ reInterpolate = require('lodash._reinterpolate'),

/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an

@@ -234,3 +253,2 @@ * array of `object` property values corresponding to the property names

* @memberOf _
* @type Function
* @category Lang

@@ -276,4 +294,8 @@ * @param {*} value The value to check.

function isError(value) {
return isObjectLike(value) &&
typeof value.message == 'string' && objectToString.call(value) == errorTag;
if (!isObjectLike(value)) {
return false;
}
var Ctor = value.constructor;
return (objectToString.call(value) == errorTag) ||
(typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag);
}

@@ -330,3 +352,4 @@

function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

@@ -575,3 +598,4 @@

var result = attempt(function() {
return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
return Function(importsKeys, sourceURL + 'return ' + source)
.apply(undefined, importsValues);
});

@@ -612,3 +636,3 @@

} catch (e) {
return isObject(e) ? e : new Error(e);
return isError(e) ? e : new Error(e);
}

@@ -615,0 +639,0 @@ });

{
"name": "lodash.template",
"version": "4.1.1",
"version": "4.2.0",
"description": "The lodash method `_.template` exported as a module.",

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

"dependencies": {
"lodash._arraymap": "^3.0.0",
"lodash._reinterpolate": "^3.0.0",

@@ -24,5 +23,5 @@ "lodash.assigninwith": "^4.0.0",

"lodash.rest": "^4.0.0",
"lodash.templatesettings": "^3.0.0",
"lodash.templatesettings": "^4.0.0",
"lodash.tostring": "^4.0.0"
}
}

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

# lodash.template v4.1.1
# lodash.template v4.2.0

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

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

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc