mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Fixed _.indexBy() thisArg example in documentation
This commit is contained in:
@@ -1725,7 +1725,7 @@ _.indexBy(keys, 'dir');
|
||||
_.indexBy(keys, function(key) { return String.fromCharCode(key.code); });
|
||||
// => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
|
||||
|
||||
_.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String);
|
||||
_.indexBy(keys, function(key) { return this.fromCharCode(key.code); }, String);
|
||||
// => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user