zhongshujie
2025-08-07 337ba7f9f3d051120734fd096e7c2fabf68152ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import asciiToArray from './_asciiToArray.js';
import hasUnicode from './_hasUnicode.js';
import unicodeToArray from './_unicodeToArray.js';
 
/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return hasUnicode(string)
    ? unicodeToArray(string)
    : asciiToArray(string);
}
 
export default stringToArray;