### Installation Source: https://github.com/saeris/valimock/blob/main/README.md Installs Valimock and Faker.js as development dependencies using npm or yarn. ```bash npm install --save-dev valimock @faker-js/faker ``` ```bash yarn add -D valimock @faker-js/faker ``` -------------------------------- ### Basic Usage Source: https://github.com/saeris/valimock/blob/main/README.md Demonstrates how to import and use the Valimock class to generate mock data for a Valibot schema. It shows creating an instance, calling the mock method, and asserting the generated data against the schema. ```typescript import { parse, array, union, string, pipe, url, number, maxValue } from "valibot"; import { Valimock } from "valimock"; describe(`example test`, () => { it(`should generate valid mock data`, () => { const schema = array(union([pipe(string(), url()), pipe(number(), maxValue(20))])); const result = new Valimock().mock(schema); expect(parse(schema, result)).toStrictEqual(result); }); }); ``` -------------------------------- ### API Coverage - Schemas Source: https://github.com/saeris/valimock/blob/main/README.md Provides an overview of Valimock's API coverage for various Valibot schema types. It indicates which schema types are fully implemented (✔), partially implemented (⚠), not implemented (❌), or unsupported (➖). ```APIDOC Schemas: | Any | Array | Bigint | Blob | Boolean | Date | Enum | | :------------: | :-------------: | :-----------: | :-----------: | :---------: | :---------: | :-------------: | | ❌ | ✔ | ✔ | ➖ | ✔ | ⚠ | ✔ | | **Instance** | **Intersect** | **Literal** | **Map** | **NaN** | **Never** | **NonNullable** | | ➖ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | | **NonNullish** | **NonOptional** | **Null** | **Nullable** | **Nullish** | **Number** | **Object** | | ✔ | ✔ | ✔ | ✔ | ✔ | ⚠ | ✔ | | **Optional** | **Picklist** | **Record** | **Recursive** | **Set** | **Special** | **String** | | ✔ | ✔ | ✔ | ✔ | ✔ | ➖ | ⚠ | | **Symbol** | **Tuple** | **Undefined** | **Union** | **Unknown** | **Variant** | **Void** | | ➖ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ``` -------------------------------- ### API Coverage - BigInt Validations Source: https://github.com/saeris/valimock/blob/main/README.md Outlines the supported validations for Valibot's BigInt schema in Valimock. It includes validations such as `maxValue`, `minValue`, and `value` as implemented (✔), with others marked as not implemented (❌) or unsupported (➖). ```APIDOC Validations for BigInt: | check | gtValue | ltValue | maxValue | minValue | | :------------: | :----------: | :-----------: | :----------: | :-------: | | ❌ | ❌ | ❌ | ✔ | ✔ | | **multipleOf** | **notValue** | **notValues** | **rawCheck** | **value** | | ❌ | ❌ | ❌ | ❌ | ✔ | | **values** | | ❌ | ``` -------------------------------- ### Valimock Supported String Types Source: https://github.com/saeris/valimock/blob/main/README.md This table outlines the string validation types supported by Valimock. It indicates whether each type is supported ('✔') or not ('❌'). Valimock aims to generate mock data that adheres to these string constraints. ```markdown | base64 | bic | bytes | creditCard | cuid2 | | :--------------: | :---------------: | :--------------: | :--------------: | :-------------: | | ✔ | ✔ | ❌ | ✔ | ✔ | | check | decimal | **digits** | **email** | **emoji** | | ❌ | ✔ | ✔ | ✔ | ✔ | | **empty** | **endsWith** | **excludes** | **graphemes** | **gtValue** | | ✔ | ❌ | ❌ | ❌ | ❌ | | **hash** | **hexadecimal** | **hexColor** | **imei** | **includes** | | ❌ | ✔ | ✔ | ✔ | ❌ | | **ip** | **ipv4** | **ipv6** | **isoDate** | **isoDateTime** | | ✔ | ✔ | ✔ | ✔ | ✔ | | **isoTime** | **isoTimeSecond** | **isoTimestamp** | **isoWeek** | **length** | | ✔ | ✔ | ✔ | ❌ | ✔ | | **ltValue** | **mac** | **mac48** | **mac64** | **maxBytes** | | ❌ | ✔ | ❌ | ❌ | ❌ | | **maxGraphemes** | **maxLength** | **maxValue** | **maxWords** | **minBytes** | | ❌ | ✔ | ❌ | ❌ | ❌ | | **minGraphemes** | **minLength** | **minValue** | **minWords** | **nanoid** | | ❌ | ✔ | ❌ | ❌ | ✔ | | **nonEmpty** | **notBytes** | **notEntries** | **notGraphemes** | **notLength** | | ✔ | ❌ | ❌ | ❌ | ❌ | | **notValue** | **notValues** | **notWords** | **octal** | **rawCheck** | | ❌ | ❌ | ❌ | ✔ | ❌ | | **regex** | **rfcEmail** | **slug** | **startsWith** | **ulid** | | ✔ | ❌ | ❌ | ❌ | ✔ | | **url** | **uuid** | **value** | **values** | **words** | | ✔ | ✔ | ❌ | ❌ | ❌ | ``` -------------------------------- ### API Coverage - Number Validations Source: https://github.com/saeris/valimock/blob/main/README.md Lists the supported validations for Valibot's Number schema in Valimock. Implemented validations include `maxValue`, `minValue`, `value`, and `integer` (✔), with others marked as not implemented (❌) or unsupported (➖). ```APIDOC Validations for Number: | check | finite | gtValue | integer | ltValue | | :-----------: | :-------------: | :------------: | :----------: | :-----------: | | ❌ | ❌ | ❌ | ✔ | ❌ | | **maxValue** | **minValue** | **multipleOf** | **notValue** | **notValues** | | ✔ | ✔ | ❌ | ❌ | ❌ | | **rawCheck** | **safeInteger** | **value** | **values** | | ❌ | ❌ | ✔ | ❌ | ``` -------------------------------- ### API Coverage - Array Validations Source: https://github.com/saeris/valimock/blob/main/README.md Details the supported validations for Valibot's Array schema within Valimock. It lists validations like `empty`, `length`, `maxLength`, `minLength`, and `nonEmpty` as implemented (✔), while others are not (❌) or unsupported (➖). ```APIDOC Validations for Array: | check | checkItems | empty | everyItem | excludes | | :-----------: | :--------------: | :-----------: | :-----------: | :----------: | | ❌ | ❌ | ✔ | ❌ | ❌ | | **includes** | **length** | **maxLength** | **minLength** | **nonEmpty** | | ❌ | ✔ | ✔ | ✔ | ✔ | | **notLength** | **partialCheck** | **rawCheck** | **someItem** | | ❌ | ❌ | ❌ | ❌ | ``` -------------------------------- ### API Coverage - Date Validations Source: https://github.com/saeris/valimock/blob/main/README.md Details the supported validations for Valibot's Date schema within Valimock. It highlights implemented validations like `maxValue`, `minValue`, and `value` (✔), while others are marked as not implemented (❌) or unsupported (➖). ```APIDOC Validations for Date: | check | gtValue | ltValue | maxValue | minValue | | :-----------: | :-----------: | :----------: | :-------: | :--------: | | ❌ | ❌ | ❌ | ✔ | ✔ | | **notValue** | **notValues** | **rawCheck** | **value** | **values** | | ❌ | ❌ | ❌ | ✔ | ❌ | ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.