mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Update doc whitespace and _.template doc example. [ci skip]
This commit is contained in:
10
dist/lodash.compat.js
vendored
10
dist/lodash.compat.js
vendored
@@ -2505,7 +2505,7 @@
|
|||||||
* @returns {Object} Returns the created inverted object.
|
* @returns {Object} Returns the created inverted object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
||||||
* // => { 'fred': 'first', 'barney': 'second' }
|
* // => { 'fred': 'first', 'barney': 'second' }
|
||||||
*/
|
*/
|
||||||
function invert(object) {
|
function invert(object) {
|
||||||
@@ -5409,8 +5409,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var view = {
|
* var view = {
|
||||||
* 'label': 'docs',
|
* 'label': 'docs',
|
||||||
* 'onClick': function() { console.log('clicked ' + this.label); }
|
* 'onClick': function() { console.log('clicked ' + this.label); }
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* _.bindAll(view);
|
* _.bindAll(view);
|
||||||
@@ -6335,8 +6335,8 @@
|
|||||||
* // => 'hello mustache!'
|
* // => 'hello mustache!'
|
||||||
*
|
*
|
||||||
* // using the `imports` option to import jQuery
|
* // using the `imports` option to import jQuery
|
||||||
* var list = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
* var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||||
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { '$': jQuery } });
|
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
|
||||||
* // => '<li>fred</li><li>barney</li>'
|
* // => '<li>fred</li><li>barney</li>'
|
||||||
*
|
*
|
||||||
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
||||||
|
|||||||
10
dist/lodash.js
vendored
10
dist/lodash.js
vendored
@@ -2172,7 +2172,7 @@
|
|||||||
* @returns {Object} Returns the created inverted object.
|
* @returns {Object} Returns the created inverted object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
||||||
* // => { 'fred': 'first', 'barney': 'second' }
|
* // => { 'fred': 'first', 'barney': 'second' }
|
||||||
*/
|
*/
|
||||||
function invert(object) {
|
function invert(object) {
|
||||||
@@ -5070,8 +5070,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var view = {
|
* var view = {
|
||||||
* 'label': 'docs',
|
* 'label': 'docs',
|
||||||
* 'onClick': function() { console.log('clicked ' + this.label); }
|
* 'onClick': function() { console.log('clicked ' + this.label); }
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* _.bindAll(view);
|
* _.bindAll(view);
|
||||||
@@ -5996,8 +5996,8 @@
|
|||||||
* // => 'hello mustache!'
|
* // => 'hello mustache!'
|
||||||
*
|
*
|
||||||
* // using the `imports` option to import jQuery
|
* // using the `imports` option to import jQuery
|
||||||
* var list = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
* var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||||
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { '$': jQuery } });
|
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
|
||||||
* // => '<li>fred</li><li>barney</li>'
|
* // => '<li>fred</li><li>barney</li>'
|
||||||
*
|
*
|
||||||
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
||||||
|
|||||||
10
dist/lodash.underscore.js
vendored
10
dist/lodash.underscore.js
vendored
@@ -1237,7 +1237,7 @@
|
|||||||
* @returns {Object} Returns the created inverted object.
|
* @returns {Object} Returns the created inverted object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
||||||
* // => { 'fred': 'first', 'barney': 'second' }
|
* // => { 'fred': 'first', 'barney': 'second' }
|
||||||
*/
|
*/
|
||||||
function invert(object) {
|
function invert(object) {
|
||||||
@@ -3681,8 +3681,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var view = {
|
* var view = {
|
||||||
* 'label': 'docs',
|
* 'label': 'docs',
|
||||||
* 'onClick': function() { console.log('clicked ' + this.label); }
|
* 'onClick': function() { console.log('clicked ' + this.label); }
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* _.bindAll(view);
|
* _.bindAll(view);
|
||||||
@@ -4423,8 +4423,8 @@
|
|||||||
* // => 'hello mustache!'
|
* // => 'hello mustache!'
|
||||||
*
|
*
|
||||||
* // using the `imports` option to import jQuery
|
* // using the `imports` option to import jQuery
|
||||||
* var list = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
* var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||||
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { '$': jQuery } });
|
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
|
||||||
* // => '<li>fred</li><li>barney</li>'
|
* // => '<li>fred</li><li>barney</li>'
|
||||||
*
|
*
|
||||||
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
||||||
|
|||||||
@@ -2254,8 +2254,8 @@ Binds methods of an object to the object itself, overwriting the existing method
|
|||||||
#### Example
|
#### Example
|
||||||
```js
|
```js
|
||||||
var view = {
|
var view = {
|
||||||
'label': 'docs',
|
'label': 'docs',
|
||||||
'onClick': function() { console.log('clicked ' + this.label); }
|
'onClick': function() { console.log('clicked ' + this.label); }
|
||||||
};
|
};
|
||||||
|
|
||||||
_.bindAll(view);
|
_.bindAll(view);
|
||||||
@@ -4237,8 +4237,8 @@ _.template('hello {{ name }}!', { 'name': 'mustache' });
|
|||||||
// => 'hello mustache!'
|
// => 'hello mustache!'
|
||||||
|
|
||||||
// using the `imports` option to import jQuery
|
// using the `imports` option to import jQuery
|
||||||
var list = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||||
_.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { '$': jQuery } });
|
_.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
|
||||||
// => '<li>fred</li><li>barney</li>'
|
// => '<li>fred</li><li>barney</li>'
|
||||||
|
|
||||||
// using the `sourceURL` option to specify a custom sourceURL for the template
|
// using the `sourceURL` option to specify a custom sourceURL for the template
|
||||||
|
|||||||
10
lodash.js
10
lodash.js
@@ -2523,7 +2523,7 @@
|
|||||||
* @returns {Object} Returns the created inverted object.
|
* @returns {Object} Returns the created inverted object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
* _.invert({ 'first': 'fred', 'second': 'barney' });
|
||||||
* // => { 'fred': 'first', 'barney': 'second' }
|
* // => { 'fred': 'first', 'barney': 'second' }
|
||||||
*/
|
*/
|
||||||
function invert(object) {
|
function invert(object) {
|
||||||
@@ -5427,8 +5427,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var view = {
|
* var view = {
|
||||||
* 'label': 'docs',
|
* 'label': 'docs',
|
||||||
* 'onClick': function() { console.log('clicked ' + this.label); }
|
* 'onClick': function() { console.log('clicked ' + this.label); }
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* _.bindAll(view);
|
* _.bindAll(view);
|
||||||
@@ -6353,8 +6353,8 @@
|
|||||||
* // => 'hello mustache!'
|
* // => 'hello mustache!'
|
||||||
*
|
*
|
||||||
* // using the `imports` option to import jQuery
|
* // using the `imports` option to import jQuery
|
||||||
* var list = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
* var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||||
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { '$': jQuery } });
|
* _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
|
||||||
* // => '<li>fred</li><li>barney</li>'
|
* // => '<li>fred</li><li>barney</li>'
|
||||||
*
|
*
|
||||||
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
* // using the `sourceURL` option to specify a custom sourceURL for the template
|
||||||
|
|||||||
Reference in New Issue
Block a user