PageRenderTime 24ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/lodash/_stringToArray.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 18 lines | 9 code | 2 blank | 7 comment | 0 complexity | 347d01063ffd2da61bc1cc5f625d2437 MD5 | raw file
 1var asciiToArray = require('./_asciiToArray'),
 2    hasUnicode = require('./_hasUnicode'),
 3    unicodeToArray = require('./_unicodeToArray');
 4
 5/**
 6 * Converts `string` to an array.
 7 *
 8 * @private
 9 * @param {string} string The string to convert.
10 * @returns {Array} Returns the converted array.
11 */
12function stringToArray(string) {
13  return hasUnicode(string)
14    ? unicodeToArray(string)
15    : asciiToArray(string);
16}
17
18module.exports = stringToArray;