├── .eslintrc.js
├── .gitignore
├── README.md
├── jest.config.js
├── package.json
├── rollup.config.js
├── rollup.iife.config.js
├── src
├── API.md
├── Builtins.ts
├── DefaultIR.ts
├── Language.ts
├── __test__
│ ├── currency.ts
│ ├── english.test.ts
│ ├── german.test.ts
│ ├── logic.test.ts
│ ├── mapped-parsers.test.ts
│ ├── parsers.test.ts
│ ├── run.ts
│ ├── schema.test.ts
│ ├── setupTests.js
│ ├── spanish.test.ts
│ ├── swedish.test.ts
│ ├── testinputs.ts
│ └── utils.test.ts
├── action.ts
├── docs
│ ├── auto.png
│ ├── bidirectional.md
│ ├── customizing-errors.md
│ ├── express.md
│ ├── form.md
│ ├── formik.md
│ ├── index.md
│ ├── languages.md
│ ├── lightweight-api.md
│ ├── logo.png
│ └── vanilla-form.png
├── iife.ts
├── index.ts
├── locales
│ ├── de-DE.ts
│ ├── emptyLocale.ts
│ ├── en-US.ts
│ ├── es-ES.ts
│ └── sv-SE.ts
├── logic.ts
├── memo.ts
├── path.ts
├── schema
│ ├── alphaNumeric.ts
│ ├── any.ts
│ ├── apply.ts
│ ├── array.ts
│ ├── atLeast.ts
│ ├── atMost.ts
│ ├── between.ts
│ ├── boolean.ts
│ ├── both.ts
│ ├── chain.ts
│ ├── collections
│ │ ├── iterable.ts
│ │ ├── map.ts
│ │ ├── set.ts
│ │ ├── toArray.ts
│ │ ├── toMap.ts
│ │ ├── toMapFromObject.ts
│ │ └── toSet.ts
│ ├── compact.ts
│ ├── date.ts
│ ├── defaultTo.ts
│ ├── either.ts
│ ├── email.ts
│ ├── emptyString.ts
│ ├── even.ts
│ ├── every.ts
│ ├── exactly.ts
│ ├── factories
│ │ ├── core.ts
│ │ ├── createSchema.ts
│ │ ├── mkParser.ts
│ │ ├── mkParserHaving.ts
│ │ ├── mkSchema.ts
│ │ └── mkSchemaHaving.ts
│ ├── fix.ts
│ ├── flip.ts
│ ├── forget.ts
│ ├── id.ts
│ ├── integer.ts
│ ├── irreversible.ts
│ ├── length.ts
│ ├── lessThan.ts
│ ├── lift.ts
│ ├── match.ts
│ ├── moreThan.ts
│ ├── not.ts
│ ├── number.ts
│ ├── object.ts
│ ├── objectExact.ts
│ ├── objectInexact.ts
│ ├── odd.ts
│ ├── oneOf.ts
│ ├── optional.ts
│ ├── optionalTo.ts
│ ├── pair.ts
│ ├── path.ts
│ ├── pipe.ts
│ ├── pure.ts
│ ├── runners
│ │ ├── check.ts
│ │ ├── checkByKey.ts
│ │ ├── cnf.ts
│ │ ├── result.ts
│ │ └── sync.ts
│ ├── self.ts
│ ├── setMessage.ts
│ ├── size.ts
│ ├── some.ts
│ ├── string.ts
│ ├── sum.ts
│ ├── swap.ts
│ ├── toDate.ts
│ ├── toJSON.ts
│ ├── toNumber.ts
│ ├── toString.ts
│ ├── toURL.ts
│ ├── unknown.ts
│ ├── updateMessage.ts
│ ├── updateNestedMessages.ts
│ └── when.ts
├── types.ts
└── utils.ts
├── tsconfig.json
├── tsfmt.json
└── yarn.lock
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3 | parserOptions: {
4 | ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5 | sourceType: "module" // Allows for the use of imports
6 | },
7 | extends: [
8 | "plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9 | ],
10 | rules: {
11 | // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
12 | // e.g. "@typescript-eslint/explicit-function-return-type": "off",
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | cdn
3 | node_modules
4 | TODO.org
5 | yarn-error.log
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | A tiny, composable validation library. Bueno primary aims to be an
6 | improvement on form validation libraries like
7 | [`yup`](https://github.com/jquense/yup) and
8 | [`superstruct`](https://github.com/ianstormtaylor/superstruct), but
9 | can also be used as a lightweight API validation library. You'll like
10 | it if you need something
11 |
12 |
🌳 Small & tree-shakeable. 14 |
💡 Expressive! Use full boolean logic to compose your schemas 15 |
💫 Bidirectional. Learn 16 | more
🚀 Awesome error messages in multiple languages 17 | supported out of the box, with more on the way. Learn more
⏱ Asynchronous 19 | (when needed!)
20 | 21 | # Try it out 22 | 23 | You can check out `bueno` directly in the browser in this 24 | [jsfiddle](https://jsfiddle.net/gm1pbk3e/11/). 25 | 26 | # Installation 27 | 28 | Install using `npm install --save bueno` or `yarn add bueno`. 29 | 30 | Check out the quickstart section below, or go directly to the API docs 31 | 32 |express
react
+ formik