0.2.3 • Published 6 years ago
classsafe v0.2.3
classsafe
A light-weight es5-compatible typescript class validator for basic types (string, number and boolean).
Installation
Run npm install --save classsafe
Example Use
import { Model, attr, string, boolean, number, validate } from 'classsafe';
class Person extends Model {
@attr(string)
name: string;
}
let p = new Person({ name: 'John'});
validate(p).then(doSth).catch(doSth);
0.2.3
6 years ago