UNPKG

edit-on-slate

Version:

Slate 기반의 직관적이고 강력한 리액트 텍스트 에디터 라이브러리

19 lines (16 loc) 432 B
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;