@valivali/superstruct
v1.0.0
Published
ValiVali Resolver for superstruct.
Downloads
3
Maintainers
Readme
@valivali/superstruct
ValiVali Resolver for superstruct.
🚀 Installation
$ npm install @valivali/core @valivali/superstruct superstruct
👏 Getting Started
The following is a simple usage example.
import { valivali } from '@valivali/core';
import { superstructResolver } from '@valivali/superstruct';
// It is also possible to import with the following aliases.
// import { resolver } from '@valivali/superstruct';
import st from 'superstruct';
const schema = st.object({
id: st.string(),
name: st.string(),
});
const value = {
id: 'id',
name: 'name',
};
const validatedValue = valivali(superstructResolver(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.