Spaces:
Build error
Build error
File size: 430 Bytes
c211499 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import asciiSize from './_asciiSize.js';
import hasUnicode from './_hasUnicode.js';
import unicodeSize from './_unicodeSize.js';
/**
* Gets the number of symbols in `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the string size.
*/
function stringSize(string) {
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
export default stringSize;
|