UNPKG

maestro

Version:

Maestro is a framework for quickly bootstrapping serverless orchestration workflows with AWS Step Functions

10 lines (7 loc) 242 B
const obfuscate = (str, n) => { const nthFromEnd = str.length - n; const tail = str.slice(nthFromEnd); const obfuscatedHead = str.slice(0, nthFromEnd).replace(/./g, "*"); return obfuscatedHead + tail; }; module.exports = obfuscate;