Socket
Socket
Sign inDemoInstall

lodash.template

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.template - npm Package Compare versions

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