How to use the monet.Validation function in monet

To help you get started, we’ve selected a few monet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github char0n / ramda-adjunct / test / cata.js View on Github external
specify('should support Validation type', function() {
      const validationR = monet.Validation.Success(1);
      const validationL = monet.Validation.Fail(2);

      assert.strictEqual(RA.cata(null, R.identity, validationR), 1);
      assert.strictEqual(RA.cata(R.identity, null, validationL), 2);
    });
  });
github char0n / ramda-adjunct / test / cata.js View on Github external
specify('should support Validation type', function() {
      const validationR = monet.Validation.Success(1);
      const validationL = monet.Validation.Fail(2);

      assert.strictEqual(RA.cata(null, R.identity, validationR), 1);
      assert.strictEqual(RA.cata(R.identity, null, validationL), 2);
    });
  });