{"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":"http://registry-npm.ywwl.com/calculate-size/download/calculate-size-0.2.0.tgz","integrity":"sha512-DppEpmyV3PKP9BCTp0r2TMXBIGg32YKzJgR+fWRWaG58pfcJLON9+qado2nZoFBswroLZrWfGEmctCP7TLqkuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUgie41FUuvH/A9cc0rw6IOEchsJ3ME13Upg1zdfSA/AIgSk/1i4ixFhxwBHjL4+RmbnYtySQ4W++n5oIfYOHHHmY="}],"size":2982,"noattachment":false,"key":"/calculate-size/-/calculate-size-0.2.0.tgz"},"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"},"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":1463660521942,"_cnpm_publish_time":1463660521942,"dist-tags":{"latest":"1.1.1"}}