CodingTrain / CodingTrain/Suggestion-Box
Validation Combinator
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Create a validation Combinator like parser combinator in JavaScript. I have done such a thing in f# but it be fun to see it in javascript. It should have the following functions and, or, allOf, anyOf, label, and mapInput.
#function signatures
* and: `Test<'a, 'error> -> Test<'a, 'error> -> Test<'a, 'error>`
* or: `Test<'a, 'error> -> Test<'a, 'error> -> Test<'a, 'error>`
* allOf: `Test<'a, 'error> list -> Test<'a, 'error>`
* anyOf: `Test<'a, 'error> list -> Test<'a, 'error>`
* label: `('error1 -> 'error2) -> Test<'a, 'error1> -> Test<'a, 'error2>`
* mapInput: `('a -> 'b) -> Test<'a, 'error> -> Test<'b, 'error>`
* run: `Test -> 'a -> Either<'a. 'error>`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.