您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

_stringToArray.js 450B

123456789101112131415161718
  1. var asciiToArray = require('./_asciiToArray'),
  2. hasUnicode = require('./_hasUnicode'),
  3. unicodeToArray = require('./_unicodeToArray');
  4. /**
  5. * Converts `string` to an array.
  6. *
  7. * @private
  8. * @param {string} string The string to convert.
  9. * @returns {Array} Returns the converted array.
  10. */
  11. function stringToArray(string) {
  12. return hasUnicode(string)
  13. ? unicodeToArray(string)
  14. : asciiToArray(string);
  15. }
  16. module.exports = stringToArray;