https://github.com/axorax/prse.js
Simple validation library with plenty of features
https://github.com/axorax/prse.js
javascript javascript-library javascript-parse js-lib js-library js-parse parse parse-type parse-types prse types validation
Last synced: 4 months ago
JSON representation
Simple validation library with plenty of features
- Host: GitHub
- URL: https://github.com/axorax/prse.js
- Owner: Axorax
- License: agpl-3.0
- Created: 2024-06-06T18:26:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-04T08:15:35.000Z (almost 2 years ago)
- Last Synced: 2025-06-15T15:16:33.047Z (about 1 year ago)
- Topics: javascript, javascript-library, javascript-parse, js-lib, js-library, js-parse, parse, parse-type, parse-types, prse, types, validation
- Language: TypeScript
- Homepage: https://npmjs.com/package/prse
- Size: 220 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

prse
Simple validation library with plenty of features
# ❓About
prse (pronounced as parse) allows you to validate your data in JavaScript with a simple yet powerful syntax.
# ✨ Usage
### Web:
```js
string().run('hello!', () => { console.log('success') });
```
### ES6:
```js
import { string } from 'prse';
string().run('hello!', () => { console.log('success') });
```
### Commonjs:
```js
const { string } = require('prse');
string().run('hello!', () => { console.log('success') });
```
### Import everything
Shown with ES6 but works similarly with commonjs and web
```js
import { p } from 'prse';
p.string().run('hello!', () => { console.log('success') });
p.number().parse(69, () => { console.log('success') }); // run and parse are same, you can use either
```
---
### 📖 Checkout the full documentation here: https://github.com/Axorax/prse.js/blob/main/docs.md
---