lodash.template
Advanced tools
Comparing version 4.2.4 to 4.2.5
64
index.js
/** | ||
* lodash 4.2.4 (Custom Build) <https://lodash.com/> | ||
* lodash (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -29,3 +29,6 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ | ||
/** | ||
* Used to match | ||
* [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). | ||
*/ | ||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; | ||
@@ -59,3 +62,3 @@ | ||
* @param {*} thisArg The `this` binding of `func`. | ||
* @param {...*} args The arguments to invoke `func` with. | ||
* @param {Array} args The arguments to invoke `func` with. | ||
* @returns {*} Returns the result of `func`. | ||
@@ -121,16 +124,2 @@ */ | ||
/** | ||
* Checks if `value` is a valid array-like index. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | ||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | ||
*/ | ||
function isIndex(value, length) { | ||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; | ||
length = length == null ? MAX_SAFE_INTEGER : length; | ||
return value > -1 && value % 1 == 0 && value < length; | ||
} | ||
/** Used for built-in method references. */ | ||
@@ -143,3 +132,4 @@ var objectProto = Object.prototype; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -172,3 +162,3 @@ */ | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new function. | ||
* @returns {Function} Returns the new accessor function. | ||
*/ | ||
@@ -195,2 +185,17 @@ function baseProperty(key) { | ||
/** | ||
* Checks if `value` is a valid array-like index. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | ||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | ||
*/ | ||
function isIndex(value, length) { | ||
length = length == null ? MAX_SAFE_INTEGER : length; | ||
return !!length && | ||
(typeof value == 'number' || reIsUint.test(value)) && | ||
(value > -1 && value % 1 == 0 && value < length); | ||
} | ||
/** | ||
* Checks if the given arguments are from an iteratee call. | ||
@@ -370,4 +375,5 @@ * | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
@@ -432,3 +438,3 @@ * @static | ||
* properties may be accessed as free variables in the template. If a setting | ||
* object is given it takes precedence over `_.templateSettings` values. | ||
* object is given, it takes precedence over `_.templateSettings` values. | ||
* | ||
@@ -492,8 +498,2 @@ * **Note:** In the development build `_.template` utilizes | ||
* | ||
* // Use custom template delimiters. | ||
* _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; | ||
* var compiled = _.template('hello {{ user }}!'); | ||
* compiled({ 'user': 'mustache' }); | ||
* // => 'hello mustache!' | ||
* | ||
* // Use backslashes to treat delimiters as plain text. | ||
@@ -524,5 +524,11 @@ * var compiled = _.template('<%= "\\<%- value %\\>" %>'); | ||
* | ||
* // Use custom template delimiters. | ||
* _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; | ||
* var compiled = _.template('hello {{ user }}!'); | ||
* compiled({ 'user': 'mustache' }); | ||
* // => 'hello mustache!' | ||
* | ||
* // Use the `source` property to inline compiled templates for meaningful | ||
* // line numbers in error messages and stack traces. | ||
* fs.writeFileSync(path.join(cwd, 'jst.js'), '\ | ||
* fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ | ||
* var JST = {\ | ||
@@ -529,0 +535,0 @@ * "main": ' + _.template(mainText).source + '\ |
{ | ||
"name": "lodash.template", | ||
"version": "4.2.4", | ||
"version": "4.2.5", | ||
"description": "The lodash method `_.template` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.template v4.2.4 | ||
# lodash.template v4.2.5 | ||
@@ -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.2.4-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.5-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
23558
618