UNPKG

string-length

Version:

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

48 lines (47 loc) 868 B
{ "name": "string-length", "version": "7.0.1", "description": "Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes", "license": "MIT", "repository": "sindresorhus/string-length", "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": ">=20" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js", "index.d.ts" ], "keywords": [ "unicode", "string", "length", "size", "count", "astral", "symbol", "surrogates", "codepoints", "ansi", "escape", "codes" ], "devDependencies": { "ava": "^6.4.1", "xo": "^1.2.3" } }