|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
432 bytes
|
| Line | |
|---|
| 1 | var asciiSize = require('./_asciiSize'),
|
|---|
| 2 | hasUnicode = require('./_hasUnicode'),
|
|---|
| 3 | unicodeSize = require('./_unicodeSize');
|
|---|
| 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 | module.exports = stringSize;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.