mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 01:45:15 +00:00
19 lines
448 B
JavaScript
19 lines
448 B
JavaScript
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;
|