docs: function setPattern(ptnMap, pattern) {
        if (ptnMap && isStr(ptnMap)) {
          isReg(pattern) ? patterns[ptnMap] = pattern : throwErr('reg');
        } else if (isObj(ptnMap)) {
          forIn(ptnMap, function (ptn, ptnVal) {
            isReg(ptnVal) ? patterns[ptn] = ptnVal : throwErr('reg');
          });
        };
      }