main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
430 bytes
|
Line | |
---|
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;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.