node package manager



contains all the common libraries that may be used across different repository

All the code in this repository is copyrighted by (Dwi Cermat Pte Ltd)

Worksheet Reader example

var xlsx = require('xlsx');
var workbook = xlsx.readFile('./filename.xlsx');
var WorksheetReader = require('cermati-utils/WorksheetReader');
var SheetNames = {
    Sheet1: 'Sheet1'
var reader = new WorksheetReader(workbook.Sheets[SheetNames.Sheet1], {
        name: 'F'
var companyNames = reader.getAll();

Logger example

var logger = require('cermati-utils/logger')(__filename);

Slack example

var Slack = require('cermati-utils/slack');
var slack = new Slack({
  webhookUrl: '',
  channel: 'insurance_payment',
  username: 'Test',
  emoji: ':moneybag:'
// this one return Promise
slack.send('Your message here');

Set ENV variables

var logger = require('cermati-utils/setEnv');

This script will set the ENV variables from the .env file in the current directory.

Use DOTENV_PATH parameter to use .env file from other directory.


$ DOTENV_PATH=./tests/.env node index.js