forked from 0x2620/oxjs
Ox.getPositionById() -> Ox.getIndexById()
This commit is contained in:
parent
4ca01b2bfa
commit
8097cc7812
19 changed files with 23 additions and 30 deletions
|
|
@ -212,8 +212,7 @@ Ox.getIndexById <f> Returns the first array index of an object with a given id
|
|||
> Ox.getIndexById([{id: 'foo', str: 'Foo'}, {id: 'bar', str: 'Bar'}], 'foo')
|
||||
0
|
||||
@*/
|
||||
// FIXME: this should be getIndexById() only
|
||||
Ox.getIndexById = Ox.getPositionById = function(arr, id) {
|
||||
Ox.getIndexById = function(arr, id) {
|
||||
return Ox.getIndex(arr, 'id', id);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue