Our great sponsors
|20 days ago||9 days ago|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Major version of nestjs-custom-injector: Exception if the provider is not set, use a promise in the default value and etc...
2 projects | dev.to | 15 Jul 2022
https://github.com/EndyKaufman/nestjs-custom-injector - Source code of library https://nestjs-custom-injector.site15.ru/api - Demo application with nestjs-custom-injector. https://github.com/EndyKaufman/nestjs-custom-injector-example - Example generated with nest cli.
TypeScript-based REST API template to quickly bootstrap your next project
3 projects | reddit.com/r/node | 27 Sep 2022
Hello, In the last month I built a REST API template in Typescript to quickly bootstrap new projects, I tried to use the most updated modules available, I've also included a "todo" sample just to showcase how all the things work together, the main modules that I've used are: - expressjs + tsoa that allows to easily generate the OpenAPI spec without any additional steps (just declare your controllers via typescript) - class-validator to validate body requests (this is also useful as the OpenAPI will be automatically generated based on the classes that you define) - Jest for testing, I've included also unit and integrations test samples with an in-memory database
Validator in js
4 projects | dev.to | 29 Jul 2022
Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/
Why doesn’t TypeScript natively do any type checking
10 projects | reddit.com/r/typescript | 27 May 2022
`ls-enum`: list all possible values for a given enum at runtime
2 projects | reddit.com/r/typescript | 14 Apr 2022
This is a little trick I pulled when doing this https://github.com/typestack/class-validator/pull/887, then I decided to write about it here https://stackrant.com/posts/typescript-enum-list-values. Now, since I've found myself using it in a lot of projects over the time, I decided to publish it, in case anybody else might find it useful. Feedback appreciated.
Rewrite Dynamic form group builder for Angular13+
4 projects | dev.to | 23 Jan 2022
As before, a fork is used to support error translations - https://github.com/EndyKaufman/class-validator-multi-lang (PR: https://github.com/typestack/class-validator/pull/743)
When can i start contributing to open source ?
6 projects | reddit.com/r/webdev | 20 Jan 2022
After that I have recently gotten into contributing some code to a few projects that I use, class-validator and validator.js which are nice and simple to contribute to validators mostly follow a standardised format.
How to properly sanitise & check POST data from REST API? Which libraries can you suggest? best ways nowadays in 2022
4 projects | reddit.com/r/webdev | 29 Dec 2021
I really enjoyed using class-transformer and class-validator for this.
How do you "stitch & glue" types for all your needs?
6 projects | reddit.com/r/typescript | 5 Dec 2021
The class-validator / class-transform looks really nice for formatting/validation but there is also joi. suretype is attractive since theoretically typeconv could generate jsonSchema for json-schema-faker and Open API docs.
Handling json input in an express app
4 projects | reddit.com/r/typescript | 12 Oct 2021
How to implement value changes in interface?
2 projects | reddit.com/r/typescript | 5 Oct 2021
There's also https://github.com/typestack/class-validator which is specifically for object validation.
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
joi - The most powerful data validation library for JS [Moved to: https://github.com/hapijs/joi]
class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.
io-ts - Runtime type system for IO decoding/encoding
openapi-typescript-validator - Generate typescript with ajv validation based on openapi schemas
schema-builder - A typescript JSON Schema library that creates a schema and its type at the same time
typebox - JSON Schema Type Builder with Static Type Resolution for TypeScript
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
FluentValidation - A popular .NET validation library for building strongly-typed validation rules.