Sha256: a3bac96ab53b7a67944e6d7e9e4cfa9b56d98064e2db2b3f42d3f78f76c943f5
Contents?: true
Size: 1.9 KB
Versions: 62
Compression:
Stored size: 1.9 KB
Contents
{ "name": "string-length", "version": "1.0.1", "description": "Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/string-length.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha" }, "files": [ "index.js" ], "keywords": [ "unicode", "string", "str", "length", "astral", "symbol", "surrogates", "codepoints", "ansi", "escape", "codes" ], "dependencies": { "strip-ansi": "^3.0.0" }, "devDependencies": { "mocha": "*" }, "readme": "# string-length [](https://travis-ci.org/sindresorhus/string-length)\n\n> Get the real length of a string - by correctly counting astral symbols and ignoring [ansi escape codes](https://github.com/sindresorhus/strip-ansi)\n\n`String#length` errornously counts [astral symbols](http://www.tlg.uci.edu/~opoudjis/unicode/unicode_astral.html) as two characters.\n\n\n## Install\n\n```\n$ npm install --save string-length\n```\n\n\n## Usage\n\n```js\n'🐴'.length;\n//=> 2\n\nstringLength('🐴');\n//=> 1\n\nstringLength('\\u001b[1municorn\\u001b[22m');\n//=> 7\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/sindresorhus/string-length/issues" }, "homepage": "https://github.com/sindresorhus/string-length#readme", "_id": "string-length@1.0.1", "_shasum": "56970fb1c38558e9e70b728bf3de269ac45adfac", "_resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", "_from": "string-length@>=1.0.0 <2.0.0" }
Version data entries
62 entries across 62 versions & 1 rubygems