Spaces:
Runtime error
Runtime error
File size: 290 Bytes
b5ea024 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
"use strict";
var eq = require("./eq")
, some = require("./some");
module.exports = function (obj, searchValue) {
var result;
return some(obj, function (value, name) {
if (eq(value, searchValue)) {
result = name;
return true;
}
return false;
})
? result
: null;
};
|