function desensitization(string="", start, end) { var star = '' function makeStar(number) { if (number > 0) { star += '*'; return makeStar(--number) } else { return star } }; return string.substring(0, start) + makeStar(end - start) + string.substring(end) } function indexOf(array, value) { return array.indexOf(value) } module.exports = { desensitization: desensitization, indexOf:indexOf, }