@httpeacejs/ecomm-common
v0.7.4
Published
ecomm common module in ts
Downloads
51
Readme
ecomm-common
Install
npm install --save @httpeacejs/ecomm-common
Usage
// helper
import { helpers } from '@httpeacejs/ecomm-common';
const locale = new Locale(localeSettings);
// get accept-language
locale.renderAcceptLanguage(helpers.getLocale(headers['accept-language']));
// set lcoale in req
req.locale = locale;
// constant
import common from '@httpeacejs/ecomm-common';
const { EmploymentStatus } = common.status;
const employmentStatus = EmploymentStatus.COMPLETED;
const employments = this.repo.find({ status: EmploymentStatus.COMPLETED });