All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.lodash._stringSize.js Maven / Gradle / Ivy

There is a newer version: 3.3.1
Show newest version
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;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy