mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Merge pull request #486 from rexxars/indexby-thisarg-docfix
Fixed `_.indexBy` `thisArg` example in documentation. [ci skip]
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