mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Fixed errors in documentation examples for _.trim, _.matchesProperty, & _.property. [ci skip]
This commit is contained in:
committed by
jdalton
parent
007ea9ea20
commit
3caa740fc4
@@ -10634,7 +10634,7 @@
|
|||||||
* // => 'abc'
|
* // => 'abc'
|
||||||
*
|
*
|
||||||
* _.map([' foo ', ' bar '], _.trim);
|
* _.map([' foo ', ' bar '], _.trim);
|
||||||
* // => ['foo', 'bar]
|
* // => ['foo', 'bar']
|
||||||
*/
|
*/
|
||||||
function trim(string, chars, guard) {
|
function trim(string, chars, guard) {
|
||||||
var value = string;
|
var value = string;
|
||||||
@@ -11016,9 +11016,9 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'barney' },
|
* { 'user': 'barney', 'age': 36 },
|
||||||
* { 'user': 'fred' },
|
* { 'user': 'fred', 'age': 40 },
|
||||||
* { 'user': 'pebbles' }
|
* { 'user': 'pebbles', 'age': 1 }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* _.find(users, _.matchesProperty('user', 'fred'));
|
* _.find(users, _.matchesProperty('user', 'fred'));
|
||||||
@@ -11170,7 +11170,7 @@
|
|||||||
* var getName = _.property('user');
|
* var getName = _.property('user');
|
||||||
*
|
*
|
||||||
* _.map(users, getName);
|
* _.map(users, getName);
|
||||||
* // => ['fred', barney']
|
* // => ['fred', 'barney']
|
||||||
*
|
*
|
||||||
* _.pluck(_.sortBy(users, getName), 'user');
|
* _.pluck(_.sortBy(users, getName), 'user');
|
||||||
* // => ['barney', 'fred']
|
* // => ['barney', 'fred']
|
||||||
|
|||||||
Reference in New Issue
Block a user