@qrvey/filters
v0.1.1
Published
Helpers and logic for Filtering Data in Qrvey app
Downloads
1,558
Readme
@qrvey/filters 0.1.1
Helpers and logic for Filtering Data in Qrvey app
Release pipelines
- Guide to run manual releases in Bitbucket: RELEASE_PIPELINES.md
Recommended consumption guide
This package exposes ESM + CommonJS:
import(ESM) for modern bundlers and better tree shaking.require(CommonJS) for legacy implementations.
1) Recommended (ESM with tree shaking)
Use named imports from the entrypoint or specific subpaths.
// Good: allows bundlers to remove unused exports
import { FilterManager, FilterBuilder } from "@qrvey/filters";
// Better for critical bundles: import only the module you need
import { FilterManager } from "@qrvey/filters/classes/index";2) Avoid for optimized bundles
// Avoid in frontend apps: can pull more code into the bundle
import * as QrveyFilters from "@qrvey/filters";3) CommonJS compatibility
For Node projects or integrations that require CommonJS:
const { FilterManager } = require("@qrvey/filters");
const { FilterManager } = require("@qrvey/filters/classes/index");4) Recommendations for consumer apps
- Prefer
importoverrequirein frontend code. - Use subpaths (
@qrvey/filters/<module>) on performance-critical paths. - Keep tree shaking enabled in your bundler (Webpack/Rollup/Vite in production mode).
Modules
| Module | Description | Subpath import | API docs |
| ------ | ----------- | -------------- | -------- |
| classes | Core classes: FilterBuilder, FilterManager, FilterAdapter, FilterSearcher, FilterValidation, FilterValues and FilterResources. | @qrvey/filters/classes/index | docs |
| helpers | Stateless utility functions for filter adaptation, settings, ID generation, type resolution and condition handling. | @qrvey/filters/helpers/index | docs |
| models | TypeScript interfaces and types for FilterBuilder, FilterResources and FilterSearcher internals. | @qrvey/filters/models/index | docs |
| resources | Enums, constants and panel interfaces for filter functions, grouping, logic, operators, scopes, validators, values, visual options and the DEFAULT_FILTER. | @qrvey/filters/resources/index | docs |
