pdsl icon indicating copy to clipboard operation
pdsl copied to clipboard

The expressive declarative toolkit for composing predicates in TypeScript or JavaScript




Predicate Domain Specific Language

Read the docs!        




Build Status npm bundle size npm codecov

An expressive declarative toolkit for composing predicates in TypeScript or JavaScript

import p from "pdsl";

const isSoftwareCreator = p`{
  name: string,
  age: > 16,
  occupation: "Engineer" | "Designer" | "Project Manager"
}`;

isSoftwareCreator(someone); // true | false
  • [x] Intuitive
  • [x] Expressive
  • [x] Lightweight - under 6k!
  • [x] No dependencies
  • [x] Small bundle size
  • [x] Fast

Documentation

PDSL Documentation