{"_id":"convert-css-length","_rev":"10-64b03b576884f600b1240317c8a4cdc8","name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","version":"1.0.0","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"dependencies":{"console-polyfill":"^0.1.2","parse-unit":"^1.0.1"},"devDependencies":{"chai":"^1.10.0","coffee-script":"^1.9.0","mocha":"^2.1.0","mocha-unfunk-reporter":"^0.4.0"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"https://github.com/KyleAMathews/convert-css-length.git"},"scripts":{"test":"NODE_ENV=test node_modules/.bin/mocha -w --recursive --compilers coffee:coffee-script/register -R mocha-unfunk-reporter"},"gitHead":"4b5ccc2b7f9ddcd618f059f075d9e54131434299","_id":"convert-css-length@1.0.0","_shasum":"8d5c521b8b95189a99102843a003c01b0009e0d4","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.35","_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"dist":{"shasum":"8d5c521b8b95189a99102843a003c01b0009e0d4","tarball":"https://registry.npmjs.org/convert-css-length/-/convert-css-length-1.0.0.tgz","integrity":"sha512-bO3miiDgiJB7pOrD9HFLHYER+sUCnaf8sZxaul3NKozdh3lvMScgULZVCTe9kLnwMc7IZtHtEd+xBaDnz510uw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLKYfOBuyEXNDnQWXe0nKJXCtqW+bvt2Wq/AWBRyVP7AiA2n+5Zxrg32z7gYX3eOBrtobC8VeMN23mCS+7dD84bzg=="}]},"directories":{}},"1.0.1":{"name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","version":"1.0.1","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"dependencies":{"console-polyfill":"^0.1.2","parse-unit":"^1.0.1"},"devDependencies":{"chai":"^1.10.0","coffee-script":"^1.9.0","mocha":"^2.1.0","mocha-unfunk-reporter":"^0.4.0"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"https://github.com/KyleAMathews/convert-css-length.git"},"scripts":{"test":"NODE_ENV=test node_modules/.bin/mocha -w --recursive --compilers coffee:coffee-script/register -R mocha-unfunk-reporter"},"gitHead":"3620646c8b366c7ead36e5b2826641df46b4fad2","_id":"convert-css-length@1.0.1","_shasum":"f3ecec664f2e873a0570e6afdd3e1ae4f92444b7","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.35","_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"dist":{"shasum":"f3ecec664f2e873a0570e6afdd3e1ae4f92444b7","tarball":"https://registry.npmjs.org/convert-css-length/-/convert-css-length-1.0.1.tgz","integrity":"sha512-cEkpvUrdmJn0r1lGtR867J8YHYBarKGFll3Lpfv+hP9a0jAQtwz5iBL6+tBc8goGewbRCsEjgjyqrYpNnZ2Nnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFB+ggbIGKcWSZq/hm459AM/Dao/kbUMTGjCGH+j8+08AiEA3PR34109oBcuU7m+Rwqj7JzCe3StjcGEM3esJqdoPWQ="}]},"directories":{}},"1.0.2":{"name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","version":"1.0.2","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"dependencies":{"console-polyfill":"^0.1.2","parse-unit":"^1.0.1"},"devDependencies":{"chai":"^1.10.0","coffee-script":"^1.9.0","microbundle":"^0.4.4","mocha":"^2.1.0","mocha-unfunk-reporter":"^0.4.0","prettier":"^1.12.1"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"license":"MIT","source":"src/index.js","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/KyleAMathews/convert-css-length.git"},"scripts":{"build":"microbundle","format":"prettier --write src/index.js"},"gitHead":"74a6562195a84437ddbd522fe693c617607d9e54","_id":"convert-css-length@1.0.2","_npmVersion":"5.8.0","_nodeVersion":"8.7.0","_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"dist":{"integrity":"sha512-ecV7j3hXyXN1X2XfJBzhMR0o1Obv0v3nHmn0UiS3ACENrzbxE/EknkiunS/fCwQva0U62X1GChi8GaPh4oTlLg==","shasum":"32f38a8ac55d78372ff43562532564366c871ccc","tarball":"https://registry.npmjs.org/convert-css-length/-/convert-css-length-1.0.2.tgz","fileCount":20,"unpackedSize":287026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3o6YCRA9TVsSAnZWagAA+uUP/2Ffm3MX+zL9GeRAStbK\nCqy2Dw2wc5Vzy0ojJj8zShpKExWNf57DMM/ruMTABsqHPn6qzn8oKdKVGHMK\njnjWiV58juNCtRs8WnZvZovI/YRWIRKItzNrugW9jRWWwUV7M0FGerPQ7+4n\nEiIxaWw4McmRXrg+zM/sj5cK3NpRUpldmtmlzQL9lXlM8001gKXFw5Y4tebK\nCfLG0xvDd7qk9h6mwh3IXKv1rV0p8zjLbYWH3E97bv46YB+Q9Wqj/ZQ8/Fc8\nBjIkYg9+rQ1kv3t+xPGeUpk2HEtCA5up9AJ2GRRozIC1oZwjGslY1V3fV6co\n9fTy35QvN4aaHtqpymk5V8gO3e5xXE5eTa81wC4mQtBT1pYj03186HYqDsMo\njZCm6hYqd5u9wY60eLxDUpdmuJuCV/2YbPquCYTVO0+YDlFHBMAJ3Xshk36r\nJpndftLFQjP2zQa1fsm9X38456i2NTc+ktLCRbuDuRS9visKEuRLgHiPYXmF\n6JnsC7sOcwPWcniPvJP/wGN8DGeNgPTT+WhrQZl1/5zskso1oY3FNv0cvcjX\nIaKUPs70T0wye+Ljis/NY1eboTH9rWWoOqekNBc7p/WTwgtV701rzfplHvqi\nj9cHBNTSNoJMUsgTRUUCgr1frOReYhGRVW1qmxUfMhCgVo3obmCdnJ20pC2h\no+AK\r\n=dVsj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrvX7mBC8z/0MXUz59el1VPeTM2w9Ly9P45ALwM654YwIgMuW/yGNO4u9mH9vd0mDsFPIcwsiMj0W6jxFfNNK265w="}]},"maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-css-length_1.0.2_1524534935768_0.22840226316270007"},"_hasShrinkwrap":false},"2.0.0":{"name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","version":"2.0.0","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"dependencies":{"console-polyfill":"^0.1.2","parse-unit":"^1.0.1"},"devDependencies":{"chai":"^1.10.0","coffee-script":"^1.9.0","esm":"^3.2.25","microbundle":"^0.11.0","mocha":"^2.1.0","mocha-unfunk-reporter":"^0.4.0","prettier":"^1.12.1"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"license":"MIT","source":"src/index.js","main":"dist/index.js","module":"dist/index.esm.js","repository":{"type":"git","url":"git+https://github.com/KyleAMathews/convert-css-length.git"},"scripts":{"test":"mocha -r esm test/index.js","build":"microbundle","format":"prettier --write src/index.js"},"gitHead":"3cca1dfc26c691f8c9524a619ae96f97e08ef2a0","_id":"convert-css-length@2.0.0","_nodeVersion":"10.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-ygBgHNzImHJ/kjgqdzC0oaY2+EMID3s88/CZD2C9O1stM3PwsOwXzzlFTTkZy/bPZe0wjyt1UoYjilfunQGjlw==","shasum":"0c60ff686e70625ef7f3fd305a2f61f33a96c289","tarball":"https://registry.npmjs.org/convert-css-length/-/convert-css-length-2.0.0.tgz","fileCount":13,"unpackedSize":26564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8dV0CRA9TVsSAnZWagAAzNkQAJ8S/Oxwr3lGR23q4ItB\nYIp63K85QfDdVBc9Lm5cuxqpFpVwfe2Xx5jQ2VrhHwVyCgXXVYWuCluw2C/b\n6mLsoo2sLq0hFY40TW+5JJXv+tuoP0yLYpQFofzwCVlEQfYropJivFugENco\nLpnIGMzy9W48Z1DtwsPK4jaTuDS6b5HS38P1QUu1ZRtVnVlEMO5l4NW2V3ey\n+Ai4nxuT7RGcjU9o2QuSpL+G9t7oM/NnBpRzK/mZ24EY2R4Bo2IwCk/hgIQx\n1u71pkN4WmKW92gCglMqmlEMJ2VEJu5tv+MJSvYMvWi3EZtWfYpmG6+s210V\nYFYe+Blpl0FpkFgnxfDHnl1eu63esLOWhAgEZiMD1rADJMGM3O7evkQg4B71\nF5b0oGQ8Nd19fHR0bC/TRfHEmPkwddYA2xj9Vj4YRXk0G6CIHMC0jqhfmD2u\n0f6OjoYy4YOP7XyVI0u0LvWrCSGuZOLnT3Yg+mkC6I9+TMnK4IgV2am5XugQ\n8NcnxPd6J2dlt+tqxjqycMNdNoMnw+413d7xUYBaD6IofAcSbn3Bz+9MabHT\nbKR7B0nlwhlbzFxCNUloeNzffPaYo9s/49sT5O7dilglQjD2zyC19mVqoGuQ\n7UUaykPIiF42xR+22EfJCgOjan26ouUbeelIYX5XXGnr63IVuEo8fZeFg747\nt7UI\r\n=1ANJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeKKyoyJmfkhx+OoXJ3vYpPFBzJ2tMskBIiv0jIZ7wNwIhANLc2nC2Aveb1+CcVpAyKs6grZvDHIdewZc5EyNSS0VU"}]},"maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-css-length_2.0.0_1559352692144_0.21283757723150964"},"_hasShrinkwrap":false},"2.0.1":{"name":"convert-css-length","description":"Convert between css lengths e.g. em->px or px->rem","version":"2.0.1","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"dependencies":{},"devDependencies":{"chai":"^1.10.0","coffee-script":"^1.9.0","esm":"^3.2.25","microbundle":"^0.11.0","mocha":"^2.1.0","mocha-unfunk-reporter":"^0.4.0","prettier":"^1.12.1"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"license":"MIT","source":"src/index.js","main":"dist/index.js","module":"dist/index.esm.js","repository":{"type":"git","url":"git+https://github.com/KyleAMathews/convert-css-length.git"},"scripts":{"test":"mocha -r esm test/*.js","build":"microbundle","publish-patch":"npm run build && npm version patch && npm publish","format":"prettier --write src/index.js"},"gitHead":"a3bbadfe1169b59dc019b4e74ddf8031d3b55393","_id":"convert-css-length@2.0.1","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-iGpbcvhLPRKUbBc0Quxx7w/bV14AC3ItuBEGMahA5WTYqB8lq9jH0kTXFheCBASsYnqeMFZhiTruNxr1N59Axg==","shasum":"90a76bde5bfd24d72881a5b45d02249b2c1d257c","tarball":"https://registry.npmjs.org/convert-css-length/-/convert-css-length-2.0.1.tgz","fileCount":15,"unpackedSize":27120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJLz1CRA9TVsSAnZWagAAGowP/0/MLXF/iFrcL+17PgqH\ny9An7TSS06/VCpRpMUYTHciRXOttIbi8WDgqeKgd/V0Nwtc14LIs2XYVTIg5\nOW7x0A0qYDbd9qQuufqD8GL59rg/Zj9itd4snyAbVMo3eTwFbllZmu+W3Xgc\n5KRn2Q5uWbeBMs5mobst5bdPKBfswJvDXomJFI+DzBnzR7iW5aHZd7iIuPe3\n43rIjdnXMhN7Uiyph5qPpG6AYy1ruk1i2df5HVK5ptAzrBDZc/hQSqnAhdfh\n9zW5ltuZXLvuyWKnL63pcDm8e4F5bRjPCD9ReSGhI6UkYgvo8fXhWs6Pe3JF\nCe5BmPJ+Oh/CAzQ8V+DSEhE9sXbVnkfsdNF7JNqAVdQDEyql2riXb9neVaKB\n3ksGLuwjoIWPGg15477r8OMqISF/lZ1kCPK9DZDsIGrb+CTiDHPk6OJqWIGH\njsmZFB4UNTbdvNRCBNaU8cBb0q0agDCKQRPd0+MQqTlqCJabGgh47Xxz91iB\nj1Y7Lgvx8QEz/848RjbNI6Rfa2MWSF+8mLwdpDYmKbQnE5dSqLYWgKDlm/Fo\nM/249XW/qT9TOxO7jlxdEkHoHcz4a5s2opi29Y32Twm4TqkzjMVx68sSvL2n\nh7RsrqsUkOFsNjIZoCQSKAau7X9S4VJ5xX67Pc0tqvx5jwmW2J5TEQwxOSL1\ntub2\r\n=BcKa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeQGwSMDQRk/nDQovTkKI6iVfIGg/7M2Q92iCU0sbItwIgD7QzP6S7AO/0clkRdcqFCEHU9Hv1Tjbkf/WbrUmeNEA="}]},"maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-css-length_2.0.1_1562688757321_0.936349020306392"},"_hasShrinkwrap":false}},"readme":"# convert-css-length\nConvert between css lengths e.g. em->px or px->rem\n\nConversions between em, ex, rem, px are supported. PRs welcome if\nyou need support for more esoteric length units.\n\n*[Note: algorithm was originally ported from Compass] (https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss)*\n\n## Install\n`npm install convert-css-length`\n\n## Usage\n```javascript\nimport convertLength from 'convert-css-length';\n\n// Set the baseFontSize for your project. Defaults to 16px (also the\n// browser default).\nvar convert = convertLength('21px');\n\n// Convert rem to px.\nconvert('1rem', 'px');\n// ---> 21px\n\n// Convert px to em.\nconvert('30px', 'em');\n// ---> 1.42857em\n\n// Convert em to pixels using fromContext.\n// em(s) are relative to the font-size at the same element. If you're setting an em on a element whose font-size\n// is different than the base font size, you'll need to pass that font-size as the third parameter.\n// Or just use rem instead which sizes everything relative to the base node.\nconvert('1em', 'px', '14px')\n// ---> 14px\n```\n","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"time":{"modified":"2022-06-13T22:51:40.019Z","created":"2015-02-11T01:26:03.063Z","1.0.0":"2015-02-11T01:26:03.063Z","1.0.1":"2015-02-11T04:30:56.888Z","1.0.2":"2018-04-24T01:55:35.870Z","2.0.0":"2019-06-01T01:31:32.249Z","2.0.1":"2019-07-09T16:12:37.422Z"},"homepage":"https://github.com/KyleAMathews/convert-css-length","keywords":["css","css","length","convert","units","sass","compass"],"repository":{"type":"git","url":"git+https://github.com/KyleAMathews/convert-css-length.git"},"author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/KyleAMathews/convert-css-length/issues"},"license":"MIT","readmeFilename":"README.md"}