Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

amilner42/kleen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: I am not currently developing this library and it is missing some key features so I probably wouldn't recommend using it right now, there are likely better validation libraries.

A typescript library which provides a very thin layer over the typescript type system allowing you to extend the compile-time guarantees to run-time. Using the code generator you can plug in some typescript types/interfaces from your project and you will be given the objects to use at runtime! The objects you are given from the generator cover the type validation for you completely, more importantly though, they allow you to plug in restrictions (either sync/async) at any level making it easy for you to handle data validation as well as type validation.

In short, this library will:

  • Improve your runtime validation (do you check ALL user generated input?)
  • Save you time (plug in interfaces, get auto-generated type validation objects)
  • Handle all your async for you, the order in which it gets run etc...
  • Vastly improve the readability of your code.

It's also designed to be so simple that you can learn the entire library (every corner of it) in 15 minutes. Guaranteed or you get your money back.

Download

npm install kleen --save

This is a strongly-typed npm package, so typings work out of the box.

Tutorial

The tutorial sits on the main website, right here.

Generator

Plug in types/interfaces and get out kleen schemas! You can find the generator on the main website right here.

Contributing

Pull Requests / Issues always welcome.

Keep in mind the goal of this validation library is to stay simple, I will likely reject any ideas (even good ones) that add too much complexity.

Bugs

Make an issue, I'll try to respond ASAP.