From b8f39cbfdf410be4b3585581084618da09bc6a90 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 19 Feb 2013 08:07:34 -0800 Subject: [PATCH] Cleanup `_.template` comments. Former-commit-id: cff1c86d3a7e9c5ee32e00762ce522690726ef09 --- dist/lodash.compat.js | 7 +++---- dist/lodash.js | 7 +++---- doc/README.md | 14 +++++++------- lodash.js | 7 +++---- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 0829b60e0..4b0dc4cf2 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -4684,7 +4684,7 @@ interpolate = options.interpolate || reNoMatch, source = "__p += '"; - // compile regexp to match each delimiter + // compile the regexp to match each delimiter var reDelimiters = RegExp( (options.escape || reNoMatch).source + '|' + interpolate.source + '|' + @@ -4718,9 +4718,8 @@ source += "';\n"; - // if `variable` is not specified and the template contains "evaluate" - // delimiters, wrap a with-statement around the generated code to add the - // data object to the top of the scope chain + // if `variable` is not specified, wrap a with-statement around the generated + // code to add the data object to the top of the scope chain var variable = options.variable, hasVariable = variable; diff --git a/dist/lodash.js b/dist/lodash.js index ccd176e96..80b196a9c 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -4534,7 +4534,7 @@ interpolate = options.interpolate || reNoMatch, source = "__p += '"; - // compile regexp to match each delimiter + // compile the regexp to match each delimiter var reDelimiters = RegExp( (options.escape || reNoMatch).source + '|' + interpolate.source + '|' + @@ -4568,9 +4568,8 @@ source += "';\n"; - // if `variable` is not specified and the template contains "evaluate" - // delimiters, wrap a with-statement around the generated code to add the - // data object to the top of the scope chain + // if `variable` is not specified, wrap a with-statement around the generated + // code to add the data object to the top of the scope chain var variable = options.variable, hasVariable = variable; diff --git a/doc/README.md b/doc/README.md index a8b99e7b9..204c7d483 100644 --- a/doc/README.md +++ b/doc/README.md @@ -861,7 +861,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4874 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4873 "View in source") [Ⓣ][1] Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain. @@ -891,7 +891,7 @@ _([1, 2, 3, 4]) ### `_.prototype.toString()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4891 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4890 "View in source") [Ⓣ][1] Produces the `toString` result of the wrapped value. @@ -912,7 +912,7 @@ _([1, 2, 3]).toString(); ### `_.prototype.valueOf()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4908 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4907 "View in source") [Ⓣ][1] Extracts the wrapped value. @@ -3391,7 +3391,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.times(n, callback [, thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4800 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4799 "View in source") [Ⓣ][1] Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*. @@ -3423,7 +3423,7 @@ _.times(3, function(n) { this.cast(n); }, mage); ### `_.unescape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4826 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4825 "View in source") [Ⓣ][1] The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters. @@ -3447,7 +3447,7 @@ _.unescape('Moe, Larry & Curly'); ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4846 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4845 "View in source") [Ⓣ][1] Generates a unique ID. If `prefix` is passed, the ID will be appended to it. @@ -3500,7 +3500,7 @@ A reference to the `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5076 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5075 "View in source") [Ⓣ][1] *(String)*: The semantic version number. diff --git a/lodash.js b/lodash.js index 5f46b0b2f..5b44a5c71 100644 --- a/lodash.js +++ b/lodash.js @@ -4691,7 +4691,7 @@ interpolate = options.interpolate || reNoMatch, source = "__p += '"; - // compile regexp to match each delimiter + // compile the regexp to match each delimiter var reDelimiters = RegExp( (options.escape || reNoMatch).source + '|' + interpolate.source + '|' + @@ -4725,9 +4725,8 @@ source += "';\n"; - // if `variable` is not specified and the template contains "evaluate" - // delimiters, wrap a with-statement around the generated code to add the - // data object to the top of the scope chain + // if `variable` is not specified, wrap a with-statement around the generated + // code to add the data object to the top of the scope chain var variable = options.variable, hasVariable = variable;