Bump to v4.2.0.

This commit is contained in:
John-David Dalton
2016-04-07 23:43:26 -07:00
parent 3c2a06a119
commit fdf249c94e
562 changed files with 23863 additions and 21738 deletions

View File

@@ -1,4 +1,4 @@
# lodash.template v4.1.1
# lodash.template v4.2.0
The [lodash](https://lodash.com/) method `_.template` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var template = require('lodash.template');
```
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.

View File

@@ -1,13 +1,12 @@
/**
* lodash 4.1.1 (Custom Build) <https://lodash.com/>
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var arrayMap = require('lodash._arraymap'),
assignInWith = require('lodash.assigninwith'),
var assignInWith = require('lodash.assigninwith'),
keys = require('lodash.keys'),
reInterpolate = require('lodash._reinterpolate'),
rest = require('lodash.rest'),
@@ -70,6 +69,26 @@ function apply(func, thisArg, args) {
return func.apply(thisArg, args);
}
/**
* 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
* array of `object` property values corresponding to the property names
@@ -229,7 +248,6 @@ function eq(value, other) {
*
* @static
* @memberOf _
* @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -270,8 +288,12 @@ function isArrayLike(value) {
* // => false
*/
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);
}
/**
@@ -323,7 +345,8 @@ function isFunction(value) {
* // => false
*/
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;
}
/**
@@ -567,7 +590,8 @@ function template(string, options, guard) {
'return __p\n}';
var result = attempt(function() {
return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
return Function(importsKeys, sourceURL + 'return ' + source)
.apply(undefined, importsValues);
});
// Provide the compiled function's source by its `toString` method or
@@ -603,7 +627,7 @@ var attempt = rest(function(func, args) {
try {
return apply(func, undefined, args);
} catch (e) {
return isObject(e) ? e : new Error(e);
return isError(e) ? e : new Error(e);
}
});

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.template",
"version": "4.1.1",
"version": "4.2.0",
"description": "The lodash method `_.template` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,12 +15,11 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._arraymap": "^3.0.0",
"lodash._reinterpolate": "^3.0.0",
"lodash.assigninwith": "^4.0.0",
"lodash.keys": "^4.0.0",
"lodash.rest": "^4.0.0",
"lodash.templatesettings": "^3.0.0",
"lodash.templatesettings": "^4.0.0",
"lodash.tostring": "^4.0.0"
}
}