mirror of
https://github.com/actions/setup-python.git
synced 2024-11-23 17:17:36 +00:00
18 lines
432 B
JavaScript
18 lines
432 B
JavaScript
var asciiSize = require('./_asciiSize'),
|
|
hasUnicode = require('./_hasUnicode'),
|
|
unicodeSize = require('./_unicodeSize');
|
|
|
|
/**
|
|
* 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);
|
|
}
|
|
|
|
module.exports = stringSize;
|