CEB Compliance Utils
Utility Library from CEB Compliance @condor-labs
In order to make things modular, we developed this utility library to be used in @condor-labs
How to use it
To use the library you just need to follow the following steps
Install the library with npm
npm install @condor-labs/ceb-compliance-utils
IMPORTANT: Before using any dataCollector method, you must call the start function ONCE at the begining of your application so that the dataCollector connects properly to mongoDB
await dataCollector.start();
Example Code
const { dataCollector, utils } = require("../../library/index");
async function init() {
try {
console.log("Starting Data Collector Module...");
await dataCollector.start();
console.log("Fetching profession using dataCollector...");
const response = await dataCollector.getSettingsByProfession(159);
console.log(response.nameProfession);
const params = {
ownerId: 123,
trigger: "UNIT_TEST",
};
const jobIdCompound = utils.generateJobId(params);
console.log(response.nameProfession);
} catch (error) {
console.error(error);
}
}
init();
How to run examples
- Go to the example folder
- Create a .env file and set the values
- Run script `node utils/index.js`, `node dataCollector/index.js`, so on...
Contributors
The original author and current lead maintainer of this module is the @condor-labs development team.
More about Condorlabs Here.
License
MIT