README.md496 B · markdown
# struct-police 👮♂️
Stop letting bad JSON roam free in your application.
`struct-police` is a lightweight, zero-dependency validator that strictly enforces schema rules. If your data doesn't fit, it goes to jail (throws an error).
## Usage
```typescript
import { police } from 'struct-police';
const schema = {
type: 'object',
required: ['id', 'username'],
properties: {
id: { type: 'number' },
username: { type: 'string' }
}
};
police(data, schema); // Safe or throws
```