{"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":"http://registry-npm.ywwl.com/calculate-size/download/calculate-size-1.0.2.tgz","integrity":"sha512-gehTYY5jrNwPR7IrbcvJi7k/ivX9rsXqZ5NQjxlG5oIiq4JygCrR0miB+NNVGxDuzlGndGXKAlnfycYvlvQKDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFF5hJ9v4p+YyMJj0rBh5eQ1GyGj8mC2MXeyc3NazXRXAiEAzKMNGbm9ABibnxoTumMKy2hvKJLxBhNZ4bYzGPTzk9s="}],"size":2781,"noattachment":false,"key":"/calculate-size/-/calculate-size-1.0.2.tgz"},"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"},"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":1481127889732,"_cnpm_publish_time":1481127889732,"dist-tags":{"latest":"1.1.1"}}