function getFirstCharacter(str, showFullIndex) { var res = str.toString(); if (showFullIndex) { return res; } return res.substring(0, 1); } module.exports = { getFirstCharacter: getFirstCharacter, };