'use strict';

var _asciiToArray = require('./_asciiToArray.js');
var _hasUnicode = require('./_hasUnicode.js');
var _unicodeToArray = require('./_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);
}

module.exports = stringToArray;
