You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
448 B
19 lines
448 B
1 month ago
|
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;
|