Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryardley/pdsl
The expressive declarative toolkit for composing predicates in TypeScript or JavaScript
https://github.com/ryardley/pdsl
boolean-function guard predicate-functions property-truthiness typescript
Last synced: 13 days ago
JSON representation
The expressive declarative toolkit for composing predicates in TypeScript or JavaScript
- Host: GitHub
- URL: https://github.com/ryardley/pdsl
- Owner: ryardley
- License: mit
- Created: 2019-07-12T12:16:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T10:29:47.000Z (over 1 year ago)
- Last Synced: 2024-10-23T14:02:42.221Z (21 days ago)
- Topics: boolean-function, guard, predicate-functions, property-truthiness, typescript
- Language: TypeScript
- Homepage: https://pdsl.site
- Size: 7.15 MB
- Stars: 69
- Watchers: 2
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Predicate Domain Specific Language
Read the docs!
[![Build Status](https://travis-ci.com/ryardley/pdsl.svg?branch=master)](https://travis-ci.com/ryardley/pdsl)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/pdsl.svg)
![npm](https://img.shields.io/npm/v/pdsl.svg)
[![codecov](https://codecov.io/gh/ryardley/pdsl/branch/master/graph/badge.svg)](https://codecov.io/gh/ryardley/pdsl)#### An expressive declarative toolkit for composing predicates in TypeScript or JavaScript
```js
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](https://pdsl.site)