ryardley / pdsl

The expressive declarative toolkit for composing predicates in TypeScript or JavaScript
https://pdsl.site
MIT License
69 stars 2 forks source link
boolean-function guard predicate-functions property-truthiness typescript




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


Documentation

PDSL Documentation