{"_id":"to-px","_rev":"10-d5f440c70d95a8376739dcc2eaafc1ec","name":"to-px","description":"Convert any CSS unit to logical pixels (\"px\")","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"to-px","version":"1.0.0","description":"Convert any CSS unit to logical pixels (\"px\")","main":"topx.js","directories":{"test":"test"},"dependencies":{"parse-unit":"^1.0.1"},"devDependencies":{"almost-equal":"^0.0.0","tape":"^3.5.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mikolalysenko/to-px.git"},"keywords":["css","px","em","ex","line","height","ch","rem","vh","vw","vmin","vmax","unit","conversion","scale","factor"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/to-px/issues"},"homepage":"https://github.com/mikolalysenko/to-px","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"d9bd0e5ad0d8f4bc166f39a8e08c9b643e2d4053","_id":"to-px@1.0.0","_shasum":"07f206d7e77e9dd5d8687306a49252c38da9baae","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.26","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"dist":{"shasum":"07f206d7e77e9dd5d8687306a49252c38da9baae","tarball":"https://registry.npmjs.org/to-px/-/to-px-1.0.0.tgz","integrity":"sha512-xK0D8T4JeUB4rAAyvpafRlOx5kJ6KEd2hAh6cEDocHG/3Tmoh1uYa8mqb5cYNwrww1/+rPLWY4JGOrbOz/Rplw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIF4pYs9bdqY/g2fUMJPUvFAgvgjG4tgW+Vafy7YIDtlAAh9K6TR7ocJpKahZoHsxyW/nBFl+pTgIyHmsJu+3V3eU"}]}},"1.0.1":{"name":"to-px","version":"1.0.1","description":"Convert any CSS unit to logical pixels (\"px\")","main":"topx.js","directories":{"test":"test"},"dependencies":{"parse-unit":"^1.0.1"},"devDependencies":{"almost-equal":"^0.0.0","tape":"^3.5.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mikolalysenko/to-px.git"},"keywords":["css","px","em","ex","line","height","ch","rem","vh","vw","vmin","vmax","unit","conversion","scale","factor"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/to-px/issues"},"homepage":"https://github.com/mikolalysenko/to-px","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"14afb29d7020430c7721869a469946deb865145e","_id":"to-px@1.0.1","_shasum":"5bbaed5e5d4f76445bcc903c293a2307dd324646","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.26","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"dist":{"shasum":"5bbaed5e5d4f76445bcc903c293a2307dd324646","tarball":"https://registry.npmjs.org/to-px/-/to-px-1.0.1.tgz","integrity":"sha512-2y3LjBeIZYL19e5gczp14/uRWFDtDUErJPVN3VU9a7SJO+RjGRtYR47aMN2bZgGlxvW4ZcEz2ddUPVHXcMfuXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3t4ds04YuG9AtgflSReszCVEtQCTyWuAjOB6GettZUAiB+5eiti+RtBeyzxIX1N/iYNBXh7/rBvAexKdcklq8F6w=="}]}},"1.1.0":{"name":"to-px","version":"1.1.0","description":"Convert any CSS unit to logical pixels (\"px\")","main":"index.js","browser":"browser.js","directories":{"test":"test"},"dependencies":{"parse-unit":"^1.0.1"},"devDependencies":{"almost-equal":"^0.0.0","tape":"^3.5.0"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"git+https://github.com/mikolalysenko/to-px.git"},"keywords":["css","px","em","ex","line","height","ch","rem","vh","vw","vmin","vmax","unit","conversion","scale","factor"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/to-px/issues"},"homepage":"https://github.com/mikolalysenko/to-px","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"e42e61ac13ee7b9fe93c9f37eb331ab1213addf4","_id":"to-px@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"dist":{"integrity":"sha512-bfg3GLYrGoEzrGoE05TAL/Uw+H/qrf2ptr9V3W7U0lkjjyYnIfgxmVLUfhQ1hZpIQwin81uxhDjvUkDYsC0xWw==","shasum":"b6b269ed5db0cc9aefc15272a4c8bcb2ca1e99ca","tarball":"https://registry.npmjs.org/to-px/-/to-px-1.1.0.tgz","fileCount":6,"unpackedSize":7927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8p5BCRA9TVsSAnZWagAAZmYP/3wrwUGUA1uU3NxiiWbo\nFKsJDIitsutiH9oQEKxgYUqj0MjL9hrPqG8C3+SF2yFsGByI0I5aGJBRXUtw\nuzhM1bW+YhmQ1egqQbnVp70mVdM8p1+RPcHbegNuG5AMwm4msRrfmwR3CraV\nqQxoTO+NyU2G7Y1M87Js9JbhYF1g8zmoCOLC8YNOcccVgw3S8GLxOm1FCx4M\n0PWg8eR0KIon1v2P7B2kzGgwzzoIVWetstrrNdtq7sl6LEg0/GJqLwaNTt6o\n54CSJ0Z/YLEFoOL/x+vhU5IiFKJnIPL0sRGjhQgVuHqnkE13bhGrDalcM/PK\nEim9jOjwqZLnIDS2FtRLygpLAds70xW5SOdes2AA1w9n93iDZ7KRmwiZ+68c\nHC3m5S7x6skKDTbZQ0ewpJSV8d+8i//RI54gZCFuET7RhBON+s51q2BfzSNs\nWVHPznc+zO8KY4AV/23cKjLyojGqz+tRfXf8vUfGHl8P2+yNnRlFuYm20NQ9\nNTiDWjzL6ktKa32RbnXvxY3hVgsrzTi+Fa8hbr2eNndLOHgnAbFhNq3WdNI8\nTAFg26HI3pAW6Ux/yVqAL36qOsjw33rGtu78DyNvgWwijYN1dGyp2gCm2Nyd\nk7IQ0spDnrRejGJW1NClC0kngAa+6vKbwDJxwwYh3vFx43UsegCjR1oyHl/s\n3ko3\r\n=+F7a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaLh1MQpvr2SEnECBd+uPRhjiBmFCAlVgaoKM4XatOrAIgBMaQPPI2iEB2cebn98/4rHqU/bw8O5wbbhrSGEj0XeU="}]},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-px_1.1.0_1542626879999_0.5607633708819051"},"_hasShrinkwrap":false}},"readme":"to-px\n=====\nGet the scale factor to convert any CSS unit to `px` (logical pixel units).\n\n[![testling badge](https://ci.testling.com/mikolalysenko/to-px.png)](https://ci.testling.com/mikolalysenko/to-px)\n\n# Example\n\n```javascript\nvar toPX = require('to-px')\n\nconsole.log(toPX('1em'))\nconsole.log(toPX('.23vh'))\nconsole.log(toPX('in'))\n```\n\n# Install\n\nNote that this module only works within the DOM.\n\n```\nnpm i to-px\n```\n\n# API\n\n#### `var scaleFactor = require('to-px')(unit[, element])`\n\nComputes the number of pixels in the `unit` string.\n\n* `unit` is a CSS unit type or a number followed by CSS unit, eg `vh` or `2in`\n* `element` is an optional element in which the unit is computed (default is `document.body`)\n\n**Returns** The number of pixels in the `unit`\n\n**Note** Conversions for `%` are not supported since they are context dependent.\n\n# License\n(c) 2015 Mikola Lysenko. MIT License\n","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-07-12T06:49:47.806Z","created":"2015-02-17T21:21:59.381Z","1.0.0":"2015-02-17T21:21:59.381Z","1.0.1":"2015-02-17T21:27:55.553Z","1.1.0":"2018-11-19T11:28:00.742Z"},"homepage":"https://github.com/mikolalysenko/to-px","keywords":["css","px","em","ex","line","height","ch","rem","vh","vw","vmin","vmax","unit","conversion","scale","factor"],"repository":{"type":"git","url":"git+https://github.com/mikolalysenko/to-px.git"},"author":{"name":"Mikola Lysenko"},"bugs":{"url":"https://github.com/mikolalysenko/to-px/issues"},"license":"MIT","readmeFilename":"README.md","users":{"yonathan-ashebir":true}}