@valivali/runtypes
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@valivali/runtypes

npm version npm download license Github Twitter

ValiVali Resolver for runtypes.

🚀 Installation

$ npm install @valivali/core @valivali/runtypes runtypes

👏 Getting Started

The following is a simple usage example.

import { valivali } from '@valivali/core';
import { runtypesResolver } from '@valivali/runtypes';
// It is also possible to import with the following aliases.
// import { resolver } from '@valivali/runtypes';
import * as rt from 'runtypes';

const schema = rt.Record({
  id: rt.String,
  name: rt.String,
});

const value = {
  id: 'id',
  name: 'name',
};

const validatedValue = valivali(runtypesResolver(schema), value);

🤝 Contributing

Contributions, issues and feature requests are welcome.

Feel free to check issues page if you want to contribute.

📝 License

Copyright © 2020 @Karibash.

This project is MIT licensed.

Package Sidebar

Install

npm i @valivali/runtypes

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.9 kB

Total Files

11

Last publish

Collaborators

  • karibash