{"versions":{"1.0.0":{"name":"get-east-asian-width","version":"1.0.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"types":"./index.d.ts","gitHead":"367c6645473bcce36c6c812081427c5cf78edcea","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_id":"get-east-asian-width@1.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-7estWZOk4GUviMbLupPCsHePNHS7fCt6yLzBv43f8Z64xRBgoOsfdDaRuT+BU6Hq2jWsKNmvxCbxo664fxEPcA==","shasum":"762072a7df71098c225ac9d239c95f117e507128","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.0.0.tgz","fileCount":6,"unpackedSize":41541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTlfdIMwaP3zuXbYMOR//F9sGNPGASU6LxSsZ0RNzV+gIhAJBtnoT7zqLhsESElBElN2YJSQ240/z0a+Nh39kAxvV3"}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-east-asian-width_1.0.0_1698494653026_0.6852380542237115"},"_hasShrinkwrap":false,"contributors":[]},"1.1.0":{"name":"get-east-asian-width","version":"1.1.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","indent-string":"^5.0.0","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"types":"./index.d.ts","gitHead":"0ab1462b12c2fd39515accaaaa54f07007304102","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_id":"get-east-asian-width@1.1.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-wwCniIDC9zyk951YonbBUjVfPhatId4PEO5WJAZsBOhD+fbu3A73uxy8fR9O31ca62siJi/QEJguFPvTJ901Pw==","shasum":"c37e1eb4346ab41cccd76c3eedac5c31f825f8f8","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.1.0.tgz","fileCount":6,"unpackedSize":15146,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdqFrj+Lqg+jSjsrdU6GTNbozAbYOkaBN+TSsV9/aHKAiAqdrosmxBO0dQ5bqSJnnMPilZc3KIADnTMMcB3jBEdHg=="}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-east-asian-width_1.1.0_1698585603953_0.5432821755832502"},"_hasShrinkwrap":false,"contributors":[]},"1.2.0":{"name":"get-east-asian-width","version":"1.2.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","indent-string":"^5.0.0","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"types":"./index.d.ts","gitHead":"8b6a63bed875c0f6c5683967a2360fd14dba7b80","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_id":"get-east-asian-width@1.2.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==","shasum":"5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz","fileCount":6,"unpackedSize":15599,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx9T+XHE7tsg7nVP4+HrR22kcxCyRN3Ub8ZrNkeGmnDwIhAI8QI8fTiwFSc37zokXiR9NYaKgFeRCvdK9YytLGUD1q"}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-east-asian-width_1.2.0_1698595456827_0.39333670603250437"},"_hasShrinkwrap":false,"contributors":[]},"1.3.0":{"name":"get-east-asian-width","version":"1.3.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","indent-string":"^5.0.0","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"_id":"get-east-asian-width@1.3.0","gitHead":"12a8e4594101f08250c009740763b3b70aef7c63","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_nodeVersion":"22.6.0","_npmVersion":"10.6.0","dist":{"integrity":"sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==","shasum":"21b4071ee58ed04ee0db653371b55b4299875389","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz","fileCount":6,"unpackedSize":15688,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwwAfs1PLyCOWpYMus3ha5+B+tGC8OB1ZL8CCHm//1YgIgRAdgZt5IyTjj24lOBx1PXjJsquGVhxFxrtvIF0GA1mg="}],"size":4605},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-east-asian-width_1.3.0_1728839439178_0.4726763557382587"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-13T17:10:39.347Z","publish_time":1728839439347,"_source_registry_name":"default","contributors":[]},"1.3.1":{"name":"get-east-asian-width","version":"1.3.1","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","indent-string":"^5.0.0","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"_id":"get-east-asian-width@1.3.1","gitHead":"1b7c37974f3b0b8af7c5dd145b486a0543b9f2fc","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==","shasum":"b85889d779881a651dfde71d3796ddbe9549012b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz","fileCount":6,"unpackedSize":15604,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDCH65K/T6Z/swyhtjEL51cSchTyqhm4GzurMt1zNM8bwIhALtS42zLqc4e0eMFWZkkwXAS3/PGdhvJgWYp5g4RmCwO"}],"size":4556},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-east-asian-width_1.3.1_1756562884149_0.6845505557918499"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-30T14:08:04.338Z","publish_time":1756562884338,"_source_registry_name":"default","contributors":[]},"1.4.0":{"name":"get-east-asian-width","version":"1.4.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","indent-string":"^5.0.0","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup.js"]},"_id":"get-east-asian-width@1.4.0","gitHead":"e0e3490e63d12f4ee8aa03eaf53063f1f4b9420d","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==","shasum":"9bc4caa131702b4b61729cb7e42735bc550c9ee6","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz","fileCount":6,"unpackedSize":15619,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHdTKnW0I48aW5bNtu5+sWY3Ze9RO6Vw67FeM8xW2ywnAiA7hWSQtLAlLcD2GikI/gj6rVFXCxLs4mhKIB5y8WNv4A=="}],"size":4560},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-east-asian-width_1.4.0_1757446564336_0.20175822532241883"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-09T19:36:04.523Z","publish_time":1757446564523,"_source_registry_name":"default","contributors":[]},"1.5.0":{"name":"get-east-asian-width","version":"1.5.0","description":"Determine the East Asian Width of a Unicode character","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-east-asian-width.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts","build":"node scripts/build.js","prepublish":"npm run build"},"keywords":["unicode","east-asian-width","eastasianwidth","character","string","width","text","layout","alignment","fullwidth","halfwidth","ambiguous","narrow","wide","neutral","typography","japanese","chinese","korean","codepoint","text-processing","i18n","l10n"],"devDependencies":{"ava":"^5.3.1","outdent":"^0.8.0","simplify-ranges":"^0.1.0","typescript":"^5.2.2","xo":"^0.56.0"},"xo":{"ignores":["lookup-data.js"]},"gitHead":"41698a85808d43dc40a43050b09b316b3dd0c5b4","types":"./index.d.ts","_id":"get-east-asian-width@1.5.0","bugs":{"url":"https://github.com/sindresorhus/get-east-asian-width/issues"},"homepage":"https://github.com/sindresorhus/get-east-asian-width#readme","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==","shasum":"ce7008fe345edcf5497a6f557cfa54bc318a9ce7","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz","fileCount":8,"unpackedSize":14524,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAKdJgM79YFDCE645bLO8gaoRePfmc6bbGs65soPJXOMAiEA1aTZuc4w/cZ/uKM2T6wIy3gKCeRGfNiZf2/qcj8d7Cc="}],"size":5269},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-east-asian-width_1.5.0_1771432494209_0.4476961568411306"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-18T16:34:54.366Z","publish_time":1771432494366,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.5.0"},"name":"get-east-asian-width","time":{"created":"2023-10-28T12:05:05.774Z","1.0.0":"2023-10-28T12:04:13.231Z","modified":"2026-02-18T16:35:05.122Z","1.1.0":"2023-10-29T13:20:04.140Z","1.2.0":"2023-10-29T16:04:16.978Z","1.3.0":"2024-10-13T17:10:39.347Z","1.3.1":"2025-08-30T14:08:04.338Z","1.4.0":"2025-09-09T19:36:04.523Z","1.5.0":"2026-02-18T16:34:54.366Z"},"readme":"# get-east-asian-width\n\n> Determine the [East Asian Width](https://unicode.org/reports/tr11/) of a Unicode character\n\n> East Asian Width categorizes Unicode characters based on their occupied space in East Asian typography, which helps in text layout and alignment, particularly in languages like Japanese, Chinese, and Korean.\n\nUnlike other similar packages, this package uses the latest Unicode data (which changes each year).\n\n## Install\n\n```sh\nnpm install get-east-asian-width\n```\n\n## Usage\n\n```js\nimport {eastAsianWidth, eastAsianWidthType} from 'get-east-asian-width';\n\nconst codePoint = '字'.codePointAt(0);\n\nconsole.log(eastAsianWidth(codePoint));\n//=> 2\n\nconsole.log(eastAsianWidthType(codePoint));\n//=> 'wide'\n```\n\n## `eastAsianWidth(codePoint: number, options?: object): 1 | 2`\n\nReturns the width as a number for the given code point.\n\n### options\n\nType: `object`\n\n#### ambiguousAsWide\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to treat an `'ambiguous'` character as wide.\n\n```js\nimport {eastAsianWidth} from 'get-east-asian-width';\n\nconst codePoint = '⛣'.codePointAt(0);\n\nconsole.log(eastAsianWidth(codePoint));\n//=> 1\n\nconsole.log(eastAsianWidth(codePoint, {ambiguousAsWide: true}));\n//=> 2\n```\n\n> Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). **If the context cannot be established reliably, they should be treated as narrow characters by default.**\n> - http://www.unicode.org/reports/tr11/\n\n## `eastAsianWidthType(codePoint: number): 'fullwidth' | 'halfwidth' | 'wide' | 'narrow' | 'neutral' | 'ambiguous'`\n\nReturns the type of “East Asian Width” for the given code point.\n\n## Related\n\n- [string-width](https://github.com/sindresorhus/string-width) - Get the visual width of a string","users":{}}