A lightweight schema-based data cutter that removes properties or array items from JavaScript objects based on a JSON Schema definition. Version 1.1.0 is the latest stable release with no defined release cadence. It provides naive sanitisation for trimming objects to a schema shape, but does not perform validation or throw errors on mismatches. Unlike validators like Ajv, schimitar focuses solely on cutting unwanted data, making it suitable for simple sanitisation before further processing.
npm install schimitarNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using schimitar to remove unwanted properties from an object based on a JSON Schema.
Use a validator like Ajv for type checking.
Ensure your schema correctly defines all allowed properties.
Inspect output carefully; consider using more robust sanitisation for complex data.
Create a .d.ts file: declare module 'schimitar' { export default function schimitar(data: any, schema: any): any; }Check the return value before using it.
Use default import: import schimitar from 'schimitar'
Run: npm install schimitar
Ensure data is a plain object before passing to schimitar.
Only use types: object, array, string, number, boolean, integer. See docs for full support.
No dependency data recorded yet.