krav

Yet another assertion library

Usage no npm install needed!

<script type="module">
  import krav from 'https://cdn.skypack.dev/krav';
</script>

README

WIP NOTICE: Krav is very much still a WIP and in no condition to be used by anyone!


codecov pipeline

Krav [kra:v]

Krav = swedish for "requirement" or "demand"

const { expect, assert, assume } = require('Krav');

expect(someValue).String.Length.Min(2);

assert(someValue).String.Either(['hi', 'hello']);

assume(someValue).String.Exact('blueberry');

Docs

See https://github.com/Olian04/Recordari/blob/master/docs/constraints.md for future reference