lodash.template
Advanced tools
Comparing version 3.2.0 to 3.3.0
31
index.js
/** | ||
* lodash 3.2.0 (Custom Build) <https://lodash.com/> | ||
* lodash 3.3.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
@@ -10,6 +10,7 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
var baseCopy = require('lodash._basecopy'), | ||
baseSlice = require('lodash._baseslice'), | ||
baseToString = require('lodash._basetostring'), | ||
baseValues = require('lodash._basevalues'), | ||
isIterateeCall = require('lodash._isiterateecall'), | ||
reInterpolate = require('lodash._reinterpolate'), | ||
escape = require('lodash.escape'), | ||
keys = require('lodash.keys'), | ||
@@ -50,17 +51,2 @@ templateSettings = require('lodash.templatesettings'); | ||
/** | ||
* Converts `value` to a string if it is not one. An empty string is returned | ||
* for `null` or `undefined` values. | ||
* | ||
* @private | ||
* @param {*} value The value to process. | ||
* @returns {string} Returns the string. | ||
*/ | ||
function baseToString(value) { | ||
if (typeof value == 'string') { | ||
return value; | ||
} | ||
return value == null ? '' : (value + ''); | ||
} | ||
/** | ||
* Used by `_.template` to escape characters for inclusion in compiled | ||
@@ -390,5 +376,12 @@ * string literals. | ||
*/ | ||
function attempt(func) { | ||
function attempt() { | ||
var length = arguments.length, | ||
func = arguments[0]; | ||
try { | ||
return func.apply(undefined, baseSlice(arguments, 1)); | ||
var args = Array(length ? length - 1 : 0); | ||
while (--length > 0) { | ||
args[length - 1] = arguments[length]; | ||
} | ||
return func.apply(undefined, args); | ||
} catch(e) { | ||
@@ -395,0 +388,0 @@ return isError(e) ? e : new Error(e); |
{ | ||
"name": "lodash.template", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "The modern build of lodash’s `_.template` as a module.", | ||
@@ -21,6 +21,7 @@ "homepage": "https://lodash.com/", | ||
"lodash._basecopy": "^3.0.0", | ||
"lodash._baseslice": "^3.0.0", | ||
"lodash._basetostring": "^3.0.0", | ||
"lodash._basevalues": "^3.0.0", | ||
"lodash._isiterateecall": "^3.0.0", | ||
"lodash._reinterpolate": "^3.0.0", | ||
"lodash.escape": "^3.0.0", | ||
"lodash.keys": "^3.0.0", | ||
@@ -27,0 +28,0 @@ "lodash.templatesettings": "^3.0.0" |
@@ -1,2 +0,2 @@ | ||
# lodash.template v3.2.0 | ||
# lodash.template v3.3.0 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.template) for more details. | ||
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.template) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16705
8
355
+ Addedlodash._basetostring@^3.0.0
+ Addedlodash.escape@^3.0.0
+ Addedlodash._basetostring@3.0.1(transitive)
- Removedlodash._baseslice@^3.0.0
- Removedlodash._baseslice@3.0.3(transitive)