Codely logo

🎼 Criteria for JavaScript & TypeScript

Codely Open Source projects Codely Pro courses

📥 Installation

To install the base criteria dependency, run the following command:

npm i @codelytv/criteria

Then, install the preferred criteria transformer. You can transform in two directions:

Create a Criteria from:

Convert a Criteria to:

You can also create your custom transformer.

✅ Testing

To facilitate the testing of the criteria, you can use the provided object mothers:

npm i @codelytv/criteria-test-mother --save-dev

âž• Other implementations

We have another implementation in PHP with converters for Laravel and Symfony. 🙌

🚀 Release

  1. At the end of each Pull Request, execute pnpm changeset to add the changes to the changelog.
  2. Push the changes.
  3. When the Pull Request is merged, a new release will be triggered, affecting only the modified packages.

If you want to merge a code without a changeset (for example, a Readme or test modification) you should execute pnpm changeset --empty in your Pull Request before merging it.