-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Is the 'is' function (according to semantic) must return a boolean or a promise.
If promise, does it have to return the value of the currently tested argument ?
Is can :
- return a simple boolean
- return a promise in both cases
At the moment the second case is in place but in case of success the value is a getter/setter :
var test1 = new toto({foo: 'toto'});
test1.fooIsFull().then(function (ret) {
ret('tata');
return res.ok(test1);
// "{\"foo\":\"tata\"}"
})
.catch(function (err) {
return res.ok(err);
})
This means that we can modifiy an attributes via an Is method, is this wanted ?
Reactions are currently unavailable