Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including js.spec with all npm packages installed. Try it out:

var jsSpec = require("js.spec")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

js.spec v0.0.4

clojure.spec for Javascript

js.spec

Latest build Coverage Status

clojure.spec for Javascript

Documentation

https://prayerslayer.gitbooks.io/js-spec/content/

Installation

npm install js.spec

For usage examples see Usage.

Implementation Status

The 0.0.x published versions should be seen as developer previews. Code may or may not work. API may or may not witness breaking changes (it will).

  • Specs
    • ✅ Primitives
    • ✅ Map
    • ✅ Collection
    • Combination
      • ✅ And
      • ✅ Or
    • ✅ Tuple
    • ✅ Nilable
  • ✅ Spec Registry
  • :construction: Spec Regexes (cat, alt, *, ?, +)
  • 😰 Generator Functions
  • 😫 Function Specs (Not even sure if it's possible the way it works in clojure.spec)

Why not use Clojurescript?

If you already thought about using CLJS, go ahead. clojure.spec is already available there. However if you meant to pull in CLJS as a dependency: clojure.spec is macro-heavy. Macros exist only at compile-time, so all the "functions" (they are macros) are gone.

License

MIT, see LICENSE

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free