docs: async function initCodeGenerator({
    CHARS_SET = EXPLICIT_CHARS,
    random = Math.random.bind(Math),
    log = noop,
  }) {
    log('debug', `Code generation service Initialized!`);
    const charsSetLength = CHARS_SET.length;
  
    return codeGenerator;
  
    /**
     * Returns a random code
     * @param  {Number}   [length]
     * An optional custon code length (defaults to 6)
     * @return {Promise<String>}
     * A promise of the generated code
     * @example
     * console.log([
     *   codeGenerator(),
     *   codeGenerator(),
     *   codeGenerator(),
     * ]);
     * // Prints: ABCDEF,GHJKMN,PRSTUV
     */
    async function codeGenerator(length = 6) {
      const code = new Array(length)
        .fill('0')
        .map(() => CHARS_SET[Math.floor(random() * (charsSetLength - 1))])
        .join('');
      log('debug', `Generated a new code:`, code);
      return code;
    }
  }