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