{"name":"fast-string-width","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/fast-string-width.git"},"description":"A fast function for calculating the visual width of a string once printed to the terminal.","version":"1.0.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["fast","string","width","cli","terminal"],"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.2","tsex":"^3.0.2","typescript":"^5.3.3"},"dependencies":{"string-width":"^7.1.0"},"_id":"fast-string-width@1.0.0","gitHead":"2763d05c15d04c2d0f674c125b1d5cbc42578d81","bugs":{"url":"https://github.com/fabiospampinato/fast-string-width/issues"},"homepage":"https://github.com/fabiospampinato/fast-string-width#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-f1VlPIDrpIlGCHepK9ViXusgyByaatm2ks1qJXwpsHJn/yFEYbu7NvU48wiDsghtqrHmY6DagHiA9SrnH4E8Bw==","shasum":"84bceeec765983be57d40cfd132f36831a008ff2","tarball":"http://registry-npm.ywwl.com/fast-string-width/download/fast-string-width-1.0.0.tgz","fileCount":16,"unpackedSize":29538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlY/0IylWVs4oQy2+kP5qADiy1NZCt3T2MyIT9tp+w1AiEApWMbRUoDcPuiZQrYWp2r9wmiPYFj2kZf7rE7RVEcgWM="}],"size":6238,"noattachment":false,"key":"/fast-string-width/-/fast-string-width-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-string-width_1.0.0_1708826070902_0.6650922712801051"},"_hasShrinkwrap":false,"readme":"# Fast String Width\n\nA fast function for calculating the visual width of a string once printed to the terminal.\n\n## Install\n\n```sh\nnpm install --save fast-string-width\n```\n\n## Usage\n\n```ts\nimport fastStringWidth from 'fast-string-width';\n\n// Calculating the visual width of some strings\n\nfastStringWidth ( 'hello' ); // => 5\nfastStringWidth ( '\\x1b[31mhello' ); // => 5\nfastStringWidth ( '👨‍👩‍👧‍👦' ); // => 2\nfastStringWidth ( 'hello👨‍👩‍👧‍👦' ); // => 7\n\n// Calculating the visual width while tweaking the width of emojis\n\nfastStringWidth ( '👶👶🏽', { emojiWidth: 1.5 } ); // => 3\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1708826071064,"_cnpm_publish_time":1708826071064,"dist-tags":{"latest":"3.0.2"}}