This seems like a straightforward implementation:
ko.observableArray.fn.findEl = function(id) {
return ko.computed(function() {
var ary = this();
return _.any(ary, function(user) { return user.id() === id;});
}, this);
};
But when I call it like:
user.current.following.findEl(valueAccessor())
It returns a function, requiring me to call findEl like:
user.current.following.findEl(valueAccessor())()
which is needless to say, not ideal.