mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
18
.internal/stringSize.js
Normal file
18
.internal/stringSize.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import asciiSize from './.internal/asciiSize.js';
|
||||
import hasUnicode from './.internal/hasUnicode.js';
|
||||
import unicodeSize from './.internal/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;
|
||||
Reference in New Issue
Block a user