forked from 0x2620/oxjs
less obscure Ox.map
This commit is contained in:
parent
33390069b9
commit
12cf77cef5
21 changed files with 125 additions and 101 deletions
|
|
@ -45,8 +45,8 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
@*/
|
||||
// FIXME: isn't value more useful in all cases?
|
||||
this[property] = function() {
|
||||
return Ox.map(items, function(item, i) {
|
||||
return item[property] ? i : null;
|
||||
return Ox.indicesOf(items, function(item) {
|
||||
return item[property];
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue