js-lib
js-lib copied to clipboard
Standard library for universal (browser/server) javascript
Here is the svg from runBench, png-ified:  I think the end result is still clean and readable so I don't see any real downside to it.
In this PR, I showcase one pattern to make `j` immutable: with decorators on every class. Why immutability? To avoid such issues: ```ts export const mySchema = j.object({ ... })...
In this PR, I showcase one pattern to make `j` immutable: with decorators on every method that mutates `this.schema`. Why immutability? To avoid such issues: ```ts export const mySchema =...
I understand the test may be useless 😅 If the types are reverted, it _will_ fail at tsc with a type error though
Helpful type to require one property in a type. Could be used like ``` const changeEntries = dailyEntries.entries.filter( (e): e is RequireProp => !!e.change, ) ``` ...to allow accessing the...
Before anything: Ajv is one of the most badly documented tool relative to how much documentation is actually produced. It is badly worded, confusing. In this PR, ChatGPT and I...