@visulima/string
Version:
Functions for manipulating strings.
2 lines (1 loc) • 403 B
JavaScript
import{isFullWidth as s,isWide as o,isAmbiguous as r,getCategory as n}from"./_isFullWidth-Dqc3MWgl.js";function t(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function a(e){return t(e),n(e)}function d(e,{ambiguousAsWide:i=!1}={}){return t(e),s(e)||o(e)||i&&r(e)?2:1}export{s as _isFullWidth,o as _isWide,d as eastAsianWidth,a as eastAsianWidthType};