{"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":"http://registry-npm.ywwl.com/calculate-size/download/calculate-size-1.0.0.tgz","integrity":"sha512-St7aPL95nFfvQsEqD8weeiR58X+zK2qvzawtD0LL4+1L5KwCHGQ9CIEs2w8UGutcFzlL0HAil6nAeWT++uJ1/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBmd+agYbQTExcY2G/cbVRuIAz2enCNouRQO7k7VmNTAIhAOfbNiJ25P2wlQYb/ml7QElVS5DbaVtOQQudRHVhjd8N"}],"size":59310,"noattachment":false,"key":"/calculate-size/-/calculate-size-1.0.0.tgz"},"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"},"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":1481127265132,"_cnpm_publish_time":1481127265132,"dist-tags":{"latest":"1.1.1"}}