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 1,000,000+ packages pre-installed, including ducktyper with all npm packages installed. Try it out:

var ducktyper = require("ducktyper")

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

ducktyper v6.0.1

A tool for validating input based on the fundamental js idea of duck typing. The object of this is to allow for clearer input validation and specification from the perspective of the developer. It will reduce the amount of time it takes to do input validation and also speed up the reading process when faced with new code. Ultimately, however, The goal is not to make a statically typed language like typescript but instead make a duck typed language. Meaning, the types of the objects are unimportant so long as they follow has-a relationships.

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