Function get source and destination alphabet and return convert function

@param {string|Array} srcAlphabet
@param {string|Array} dstAlphabet

@returns {function(number|Array)}
1422
function anyBase(srcAlphabet, dstAlphabet) {
    var converter = new Converter(srcAlphabet, dstAlphabet);
    /**
     * Convert function
     *
     * @param {string|Array} number
     *
     * @return {string|Array} number
     */
    return function (number) {
        return converter.convert(number);
    }
}
569335
function cleanAlphabet(alphabet) {
    return alphabet.split('').filter(function (item, pos, self) {
      return self.indexOf(item) === pos;
    }).join('');
  }
1242314
public static String convert(String source, String srcCharset, String destCharset) {
		return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
	}
142143
function (target, src) {
    var array = Array.isArray(src);
    var dst = array && [] || {};

    if (array) {
      target = target || [];
      dst = dst.concat(target);
      src.forEach(function(e, i) {
        if (typeof dst[i] === 'undefined') {
          dst[i] = e;
        } else if (typeof e === 'object') {
          dst[i] = Utils.merge(target[i], e);
        } else {
          if (target.indexOf(e) === -1) {
            dst.push(e);
          }
        }
      });
    } else {
      if (target && typeof target === 'object') {
        Object.keys(target).forEach(function (key) {
          dst[key] = target[key];
        })
      }
      Object.keys(src).forEach(function (key) {
        if (typeof src[key] !== 'object' || !src[key]) {
          dst[key] = src[key];
        }
        else {
          if (!target[key]) {
            dst[key] = src[key];
          } else {
            dst[key] = Utils.merge(target[key], src[key]);
          }
        }
      });
    }

    return dst;
  }
405793
public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
        s.getChars(srcBegin, srcEnd, dst, dstBegin);
    }
425756
function convertUint8ArraysToArrays(sources) {
  var targets = [];
  for (var n = 0; n < sources.length; n++) {
    var source = sources[n];
    var target = new Array(source.length);
    for (var i = 0; i < source.length; i++) {
      target[i] = source[i];
    }
    targets.push(target);
  }
  return targets;
}
1009147
function getCodeFromNode(node, renameSources, options) {
    const code_map = getCodeMap(node);
    const rename = renameSources;
    const objMap = code_map.map.toJSON();
    let i, n;

    if (rename) {
        if ('string' === typeof rename) {
            for (i = 0, n = objMap.sources.length; i < n; i++) {
                objMap.sources[i] = rename + objMap.sources[i];
            }
        } else if ('function' === typeof rename) {
            for (i = 0, n = objMap.sources.length; i < n; i++) {
                objMap.sources[i] = rename(objMap.sources[i]);
            }
        } else {
            console.warn('unexpected type of rename: ' + typeof rename);
        }
    }

    return node.toString() +
        convert.fromObject(objMap)
            .toComment(options)
            .replace(/charset=utf-8;/gm, '')
            .replace('data:application/json;', 'data:application/json;charset=utf-8;') + '\n';
}
168401
function indexMap(s) {
        if (typeof s == 'string') {
            return indexMapStr(s);
        } else {
            var ret = [],
                i = 0,
                l = s.length;
            for (; i < l; i++) {
                ret[i] = indexMapStr(s[i]);
            }
            return ret;
        }
    }
712632
function camelToKebab( string ) {
	return string.replace( ptnCamel, ( all, predecessor, match ) => predecessor + "-" + match.toLocaleLowerCase() );
}
289069
function saslprep(input, opts = {}) {
  if (typeof input !== 'string') {
    throw new TypeError('Expected string.');
  }

  if (input.length === 0) {
    return '';
  }

  // 1. Map
  const mapped_input = toCodePoints(input)
    // 1.1 mapping to space
    .map(character => (mapping2space.get(character) ? 0x20 : character))
    // 1.2 mapping to nothing
    .filter(character => !mapping2nothing.get(character));

  // 2. Normalize
  const normalized_input = String.fromCodePoint
    .apply(null, mapped_input)
    .normalize('NFKC');

  const normalized_map = toCodePoints(normalized_input);

  // 3. Prohibit
  const hasProhibited = normalized_map.some(character =>
    prohibited_characters.get(character)
  );

  if (hasProhibited) {
    throw new Error(
      'Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3'
    );
  }

  // Unassigned Code Points
  if (opts.allowUnassigned !== true) {
    const hasUnassigned = normalized_map.some(character =>
      unassigned_code_points.get(character)
    );

    if (hasUnassigned) {
      throw new Error(
        'Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5'
      );
    }
  }

  // 4. check bidi

  const hasBidiRAL = normalized_map.some(character =>
    bidirectional_r_al.get(character)
  );

  const hasBidiL = normalized_map.some(character =>
    bidirectional_l.get(character)
  );

  // 4.1 If a string contains any RandALCat character, the string MUST NOT
  // contain any LCat character.
  if (hasBidiRAL && hasBidiL) {
    throw new Error(
      'String must not contain RandALCat and LCat at the same time,' +
        ' see https://tools.ietf.org/html/rfc3454#section-6'
    );
  }

  /**
   * 4.2 If a string contains any RandALCat character, a RandALCat
   * character MUST be the first character of the string, and a
   * RandALCat character MUST be the last character of the string.
   */

  const isFirstBidiRAL = bidirectional_r_al.get(
    getCodePoint(first(normalized_input))
  );
  const isLastBidiRAL = bidirectional_r_al.get(
    getCodePoint(last(normalized_input))
  );

  if (hasBidiRAL && !(isFirstBidiRAL && isLastBidiRAL)) {
    throw new Error(
      'Bidirectional RandALCat character must be the first and the last' +
        ' character of the string, see https://tools.ietf.org/html/rfc3454#section-6'
    );
  }

  return normalized_input;
}
619526
private static byte[] getDecodabet(int options) {
        if ((options & URL_SAFE) == URL_SAFE) {
            return _URL_SAFE_DECODABET;
        } else if ((options & ORDERED) == ORDERED) {
            return _ORDERED_DECODABET;
        } else {
            return _STANDARD_DECODABET;
        }
    }
832487
function pctCharAt(text, startIndex) {
        var chr = text.charAt(startIndex);
        if (!isPercentDigitDigit(text, startIndex)) {
            return chr;
        }
        var utf8CharCode = parseHex2(text, startIndex + 1);
        var numBytes = utf8.numBytes(utf8CharCode);
        if (numBytes === 0) {
            return chr;
        }
        for (var byteNumber = 1; byteNumber < numBytes; byteNumber += 1) {
            if (!isPercentDigitDigit(text, startIndex + 3 * byteNumber) || !utf8.isValidFollowingCharCode(parseHex2(text, startIndex + 3 * byteNumber + 1))) {
                return chr;
            }
        }
        return text.substr(startIndex, 3 * numBytes);
    }
5222
public Map<Symbol, Symbol> sourceSymbolMap(int sourceIndex)
    {
        ImmutableMap.Builder<Symbol, Symbol> builder = ImmutableMap.builder();
        for (Map.Entry<Symbol, Collection<Symbol>> entry : outputToInputs.asMap().entrySet()) {
            builder.put(entry.getKey(), Iterables.get(entry.getValue(), sourceIndex));
        }

        return builder.build();
    }
718376
function(seq1, seq2, stepMap){
    // get contrast arrays (src & target) by analyze step by step
    var l1 = seq1.length,
        l2 = seq2.length,
        src = [], target = [];

    for(var i = l1,j = l2; i > 0 || j > 0;){
        switch(stepMap[i][j]){

        case STEP_NOCHANGE:
            src.unshift(seq1[i-1]);
            target.unshift(MARK_SAME);
            i -= 1;
            j -= 1;
            break;

        case STEP_REPLACE:
            src.unshift(seq1[i-1]);
            target.unshift(seq2[j-1]);
            i -= 1;
            j -= 1;
            break;

        case STEP_REMOVE:
            src.unshift(seq1[i-1]);
            target.unshift(MARK_EMPTY);
            i -= 1;
            j -= 0;
            break;

        case STEP_INSERT:
            src.unshift(MARK_EMPTY);
            target.unshift(seq2[j-1]);
            i -= 0;
            j -= 1;
            break;

        }
    }

    return {
        src: src,
        target: target
    };
}
9170
function( srcRgb, dstRgb, srcAlpha, dstAlpha ){
    this._dat[ 0|BLEND_FUNC_C_SRC ] = srcRgb;
    this._dat[ 0|BLEND_FUNC_C_DST ] = dstRgb;
    this._dat[ 0|BLEND_FUNC_A_SRC ] = srcAlpha;
    this._dat[ 0|BLEND_FUNC_A_DST ] = dstAlpha;
    this._set |= BLEND_FUNC_SET | BLEND_FUNC_A_SET;
    return this;
  }
459665
public static void flatCopyTo(String prefix, Map<String, Object> sourceMap,
                                  Map<String, String> dstMap) {
        for (Map.Entry<String, Object> entry : sourceMap.entrySet()) {
            String key = prefix + entry.getKey();
            Object value = entry.getValue();
            if (value instanceof String) {
                dstMap.put(key, (String) value);
            } else if (value instanceof Number) {
                dstMap.put(key, value.toString());
            } else if (value instanceof Map) {
                flatCopyTo(key + ".", (Map<String, Object>) value, dstMap);
            }
        }
    }
681424
function convertLocaleToBCP47(sLocale) {
		var m;
		if ( typeof sLocale === 'string' && (m = rLocale.exec(sLocale.replace(/_/g, '-'))) ) {
			var sLanguage = m[1].toLowerCase();
			sLanguage = M_ISO639_OLD_TO_NEW[sLanguage] || sLanguage;
			return sLanguage + (m[3] ? "-" + m[3].toUpperCase() + (m[4] ? "-" + m[4].slice(1).replace("_","-") : "") : "");
		}
	}