{"_id":"calculate-size","_rev":"9-30c8dbcfb2b3ddb954094fc5889380bb","name":"calculate-size","description":"Calculate the pixel size of a string","dist-tags":{"latest":"1.1.1"},"versions":{"0.1.0":{"name":"calculate-size","version":"0.1.0","description":"Calculate the pixel size of a string","main":"src/calculate-size.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"grunt":"~0.4.2","grunt-casper":"~0.3.0","grunt-contrib-connect":"~0.7.0","load-grunt-tasks":"~0.3.0","casperjs":"~1.1.0-beta3","phantomjs":"~1.9.7-1"},"gitHead":"2b8caad797b4091d19a4a566eb7ef0e6952c1fac","_id":"calculate-size@0.1.0","_shasum":"5c4b0576c30b502c36dab0fc4b6240a92784c678","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"dist":{"shasum":"5c4b0576c30b502c36dab0fc4b6240a92784c678","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-0.1.0.tgz","integrity":"sha512-DgSxP76BUsoWGbhVU2joJmGNlXakjs9BnvU+AKjrMZ5EoRj7ZTcutcIF3tz+HYCly3RTrZuC50MVS2E55iOT2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCyUlnCUrNIVSTjoZ+aj4/wNYFLQiqo30tUdM2JlCPpQIhAOwqUOZ7Ijr4ofvAfBye7BQeS3GP6Lme1AjXBAl5oC5h"}]}},"0.2.0":{"name":"calculate-size","version":"0.2.0","description":"Calculate the pixel size of a string","main":"src/calculate-size.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"casperjs":"~1.1.0-beta3","grunt":"^1.0.1","grunt-casper":"~0.3.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"~0.7.0","load-grunt-tasks":"~0.3.0","phantomjs":"~1.9.7-1"},"gitHead":"5b47404cc5f89f4d1cd00080b5418ef5dbd4d1e3","_id":"calculate-size@0.2.0","_shasum":"3350ab1bfb70dd4d7bd425da4851bb72cbae79aa","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"3350ab1bfb70dd4d7bd425da4851bb72cbae79aa","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-0.2.0.tgz","integrity":"sha512-DppEpmyV3PKP9BCTp0r2TMXBIGg32YKzJgR+fWRWaG58pfcJLON9+qado2nZoFBswroLZrWfGEmctCP7TLqkuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUgie41FUuvH/A9cc0rw6IOEchsJ3ME13Upg1zdfSA/AIgSk/1i4ixFhxwBHjL4+RmbnYtySQ4W++n5oIfYOHHHmY="}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/calculate-size-0.2.0.tgz_1463660518861_0.053769628051668406"}},"1.0.0":{"name":"calculate-size","version":"1.0.0","description":"Calculate the pixel size of a string","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"ava -s test/index.js","prepublish":"npm run build","build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"ava":"^0.17.0","express":"^4.14.0","nightmare":"^2.8.1","typescript":"^2.0.10"},"gitHead":"5b47404cc5f89f4d1cd00080b5418ef5dbd4d1e3","_id":"calculate-size@1.0.0","_shasum":"65f1bb33733534d4a266b6be6228ed03624e06a6","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"65f1bb33733534d4a266b6be6228ed03624e06a6","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-1.0.0.tgz","integrity":"sha512-St7aPL95nFfvQsEqD8weeiR58X+zK2qvzawtD0LL4+1L5KwCHGQ9CIEs2w8UGutcFzlL0HAil6nAeWT++uJ1/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBmd+agYbQTExcY2G/cbVRuIAz2enCNouRQO7k7VmNTAIhAOfbNiJ25P2wlQYb/ml7QElVS5DbaVtOQQudRHVhjd8N"}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/calculate-size-1.0.0.tgz_1481127264479_0.4497378231026232"}},"1.0.1":{"name":"calculate-size","version":"1.0.1","description":"Calculate the pixel size of a string","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"ava -s test/index.js","prepublish":"npm run build","build":"rm -rf lib && tsc"},"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"ava":"^0.17.0","express":"^4.14.0","nightmare":"^2.8.1","typescript":"^2.0.10"},"gitHead":"b522b9040083f6f9e7717f8edf15d6ba873d731c","_id":"calculate-size@1.0.1","_shasum":"1d88a8f4560a3d7367eeb96c34de020411098ef1","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"1d88a8f4560a3d7367eeb96c34de020411098ef1","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-1.0.1.tgz","integrity":"sha512-1qhgLRBcyx2wMHFICVOyiaheRjr2yGZzmNLJ5gwHaOJUliMDUqyf1sdf70dLUpNNM8smlEEd5OU4nURSw76Whg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDknTb4wyKxZk0U5JgOu7uZ9fncTXX/HKEE4ma6F71K2AiApC5I6SRnnFFdozBPua9xj3ctDpkJEh/enMuRdN3hnHA=="}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/calculate-size-1.0.1.tgz_1481127730634_0.23683755239471793"}},"1.0.2":{"name":"calculate-size","version":"1.0.2","description":"Calculate the pixel size of a string","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"ava -s test/index.js","prepublish":"npm run build","build":"rm -rf lib && tsc"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"ava":"^0.17.0","express":"^4.14.0","nightmare":"^2.8.1","typescript":"^2.0.10"},"gitHead":"17ac7a8da9418983d98879e8ae8c18e0a6a631ce","_id":"calculate-size@1.0.2","_shasum":"6112c503859b769739c14a65567876f9a8cf79c7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"6112c503859b769739c14a65567876f9a8cf79c7","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-1.0.2.tgz","integrity":"sha512-gehTYY5jrNwPR7IrbcvJi7k/ivX9rsXqZ5NQjxlG5oIiq4JygCrR0miB+NNVGxDuzlGndGXKAlnfycYvlvQKDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFF5hJ9v4p+YyMJj0rBh5eQ1GyGj8mC2MXeyc3NazXRXAiEAzKMNGbm9ABibnxoTumMKy2hvKJLxBhNZ4bYzGPTzk9s="}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/calculate-size-1.0.2.tgz_1481127889069_0.9929834790527821"}},"1.1.0":{"name":"calculate-size","version":"1.1.0","description":"Calculate the pixel size of a string","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"ava -s test/index.js","prepublish":"npm run build","build":"rm -rf lib && tsc"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"ava":"^0.17.0","express":"^4.14.0","nightmare":"^2.8.1","typescript":"^2.0.10"},"gitHead":"45accdbb83107f39953cbd2c1862f460cde1f55b","_id":"calculate-size@1.1.0","_shasum":"1d3399bd65178e53db7ba77f89209391f4de4685","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"1d3399bd65178e53db7ba77f89209391f4de4685","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-1.1.0.tgz","integrity":"sha512-8AR3j9Sj0zMh+wsvNuwQWiMQ5AHo+Lk+epI36Og6tiv/C9wuM+8Q9UbLb+SZRpo1/elFOFofK4LBcdPDOcbtDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGh7HNJR/qL6Fc2qw725P7MNPX4Gb6JvH6+eBCrsGZ5GAiEA735kRINq9Zxqy/EB6fB0HWixGMdhUbPd9ZdI5wdjF5o="}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/calculate-size-1.1.0.tgz_1481191632969_0.898003293434158"}},"1.1.1":{"name":"calculate-size","version":"1.1.1","description":"Calculate the pixel size of a string","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"ava -s test/index.js","prepublish":"npm run build","build":"rm -rf lib && tsc"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"ava":"^0.17.0","express":"^4.14.0","nightmare":"^2.8.1","typescript":"^2.0.10"},"gitHead":"a524c5a3cf736bd574dc8a878a81678417c08b70","_id":"calculate-size@1.1.1","_shasum":"ae7caa1c7795f82c4f035dc7be270e3581dae3ee","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"dist":{"shasum":"ae7caa1c7795f82c4f035dc7be270e3581dae3ee","tarball":"https://registry.npmjs.org/calculate-size/-/calculate-size-1.1.1.tgz","integrity":"sha512-jJZ7pvbQVM/Ss3VO789qpsypN3xmnepg242cejOAslsmlZLYw2dnj7knnNowabQ0Kzabzx56KFTy2Pot/y6FmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCziGrW03SLLnoFU1M0j+qW90rNJbgpbnMqcBFRONVtwIgBU40GsNRl8CjbhEhcYKgS8hGFYjciJWHRb0lRCUWULg="}]},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/calculate-size-1.1.1.tgz_1481191983777_0.7354384313803166"}}},"readme":"calculate-size [![Build Status](https://travis-ci.org/schickling/calculate-size.svg?branch=master)](https://travis-ci.org/schickling/calculate-size) [![npm version](https://badge.fury.io/js/calculate-size.svg)](https://badge.fury.io/js/calculate-size)\n==============\n\nCalculate the pixel size (width/height) of a string (with integrated caching)\n\n## Install\n\n> This package supports Typescript out-of-the-box\n\n```sh\n$ npm install calculate-size\n```\n\n## Usage\n\n```js\nconst size = calculateSize('Hello world!', {\n   font: 'Arial',\n   fontSize: '12px'\n})\n\n### Options\n\n* `font: string`\n* `fontSize: string`\n* `fontWeight: string`\n* `width: string` (Constraint width by a fixed value to calc height)\n\nconsole.log(size.width) // 140\nconsole.log(size.height) // 20\n```\n","maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"time":{"modified":"2022-06-13T05:25:23.657Z","created":"2015-05-25T19:03:33.452Z","0.1.0":"2015-05-25T19:03:33.452Z","0.2.0":"2016-05-19T12:22:01.942Z","1.0.0":"2016-12-07T16:14:25.132Z","1.0.1":"2016-12-07T16:22:11.289Z","1.0.2":"2016-12-07T16:24:49.732Z","1.1.0":"2016-12-08T10:07:13.565Z","1.1.1":"2016-12-08T10:13:05.427Z"},"homepage":"https://github.com/schickling/calculate-size","keywords":["font","calculate","size","width","height","dimension"],"repository":{"type":"git","url":"git+https://github.com/schickling/calculate-size.git"},"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"license":"MIT","readmeFilename":"README.md"}