inversify-page-request
v1.0.0
Published
page request util definitions
Downloads
5
Readme
inversify-page-request
inversify page request utility
install dependencies
npm install
build
npm run build
test
npm test
test with coverage report
npm run test:coverage
mutation test
npm run test:mutation
format
npm run format
Install into project
npm install inversify-page-request
How to use
Load the module.
...
import { PageRequestModule } from "inversify-page-request";
...
export const container = (): Container => {
const container = new Container();
container.load(new PageRequestModule());
return container;
};
Inject the interface by type.
...
import { PAGE_REQUEST_TYPE, PageRequestMapperInterface } from "inversify-page-request";
...
@inject(PAGE_REQUEST_TYPE.PageRequestMapper)
private readonly pageRequestMapper: PageRequestMapperInterface
Use the mapper.
...
const requestModel = pageRequestMapper.mapper(requestDto);
...