Skip to content

'is' functions semantic #1

@LancelotP

Description

@LancelotP

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions