source: imaps-frontend/node_modules/lodash-es/_stringSize.js@ d565449

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 
1import asciiSize from './_asciiSize.js';
2import hasUnicode from './_hasUnicode.js';
3import 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 */
12function stringSize(string) {
13 return hasUnicode(string)
14 ? unicodeSize(string)
15 : asciiSize(string);
16}
17
18export default stringSize;
Note: See TracBrowser for help on using the repository browser.