{"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":"http://registry-npm.ywwl.com/calculate-size/download/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="}],"size":2806,"noattachment":false,"key":"/calculate-size/-/calculate-size-1.1.0.tgz"},"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"},"directories":{},"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","publish_time":1481191633565,"_cnpm_publish_time":1481191633565,"dist-tags":{"latest":"1.1.1"}}