@katomaran/nest-utilities
@katomaran/nest-utilities
is a utility package for NestJS applications, including a ParseQueryInterceptor
to help handle query parameters such as pagination, search, and server timestamps.
Installation
npm install @katomaran/nest-utilities
Usage
Import the ParseQueryInterceptor in your controller or globally in your application.
import { ParseQueryInterceptor } from '@katomaran/nest-utilities';
Apply the interceptor to your controllers.
@Controller('example')
@UseInterceptors(ParseQueryInterceptor)
export class ExampleController {
// Your controller methods
}
Functions
ParseQueryInterceptor
page: Page number for pagination (default: 1).
limit: Items per page (default: 10).
skip: Calculated skip value for pagination.
search: Escaped special characters in search terms.
serverTime: Current server time for each request.
arduino
This setup will give you a CI/CD pipeline that runs on the release
branch and automatically publishes the package to npm.