{"_id":"use-device-pixel-ratio","_rev":"5-9c23fc5bda89fa4cd42a9e9c835ad7b4","name":"use-device-pixel-ratio","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"use-device-pixel-ratio","version":"1.0.0","description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"license":"MIT","author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"sideEffects":false,"main":"./dist/index.js","unpkg":"./dist/index.umd.js","module":"./dist/index.module.js","source":"./index.ts","types":"./dist/index.d.ts","scripts":{"dev":"vite","build":"microbundle --target node","prepare":"npm run build","test":"jest"},"devDependencies":{"@babel/preset-typescript":"^7.14.5","@types/jest":"^27.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@vitejs/plugin-react-refresh":"^1.3.1","eslint":"^7.0.0","eslint-config-prettier":"^7.0.0","eslint-config-sanity":"^5.0.0","jest":"^27.1.0","microbundle":"^0.13.3","prettier":"^2.3.2","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typescript":"^4.3.5","vite":"^2.5.2"},"peerDependencies":{"react":">=16.8.0"},"gitHead":"1d84769b27ba8888a79cdb308b8e9e23f5d55577","bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","_id":"use-device-pixel-ratio@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"7.17.0","dist":{"integrity":"sha512-OM6dYzpc5BKC2TvVsA8bYKJZNWXD/T3XwArzMas1BRZlbGu8Xx/18n9o+ifU7H9wJsfpW36cyp7nulYk6cQcIA==","shasum":"0ca55cceda4ffb74265e2dbc95373d820f8eb8f7","tarball":"https://registry.npmjs.org/use-device-pixel-ratio/-/use-device-pixel-ratio-1.0.0.tgz","fileCount":20,"unpackedSize":31060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLkhwCRA9TVsSAnZWagAAII8P/inQcI5+beTz51iVeogh\niQeu+75m4o2EWjFUaNeiyyVWbQf7Edm6KWKsUff5NqF11eqnSDZ8FG9BXNrv\n6Qz9E/ShfCJbMiffCSPozNRUp/Seh/dWksSodQHQLJaY+qwudFOhKAR3M5mW\noTh26m+Hi6ZSrf4T3jnY+ccSjR2AQXtzlTM0514hXyZ5TGV26cROZjJZDvYG\n1yyR8uypTNkHhGsPKoGoddyYNZ1uECAfDz+VSy2Db7pVlWABDM3lcq7xCIhy\nhGBLCGjVkx/BI7saj0YIrb/hDlwoMOPk1Po4YdxnOGjazyEDD6Kk6vbqSORc\nAi/mabUnO7LedYS34SguuTDKFOtR+YNZgqMULNrnuITX4MDtb5XOccgnRyrL\nARgYeww4qD7TrgVQwqLzBCJdWGlCBLwbgOSN/v8Xal3+premNmT3W/o/udrH\nbeFoK3I/U1MCkxJZfgrbUe7zTeRHoUKvaldxASWV2wCUMSx611c9bZe8ziKv\nb6DnqQuzHqKykl37a0nGMRi5oJB8NmQx+72jWnFYB073quCc5jYmGcKVHy70\njDmhbp6v2SUqhfv0LrpEk6Q0DnOAuHg3tGL40bExG4Jkhd+82kvqfq1BIFXT\nHV+N8escqxvjG5K8Wc1U6aM/VAgVvrOEY1VubLk1jf25HZEX8sedR2rgLaHN\ngjDW\r\n=phH9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJ6AcHMHZCrG2YJaiqYEzVGOf9UZHysxFsrMXyRCYd0AiBA2KERIFTLNRoO8kOoRxf8xBTarui2axaHUwtkrDh7HA=="}]},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"directories":{},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-device-pixel-ratio_1.0.0_1630423152855_0.3760602404042859"},"_hasShrinkwrap":false},"1.0.1":{"name":"use-device-pixel-ratio","version":"1.0.1","description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"license":"MIT","author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"sideEffects":false,"main":"./dist/index.js","unpkg":"./dist/index.umd.js","module":"./dist/index.module.js","source":"./index.ts","types":"./dist/index.d.ts","scripts":{"dev":"vite","build":"microbundle --target node","prepare":"npm run build","test":"jest"},"devDependencies":{"@babel/preset-typescript":"^7.14.5","@types/jest":"^27.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@vitejs/plugin-react-refresh":"^1.3.1","eslint":"^7.0.0","eslint-config-prettier":"^7.0.0","eslint-config-sanity":"^5.0.0","jest":"^27.1.0","microbundle":"^0.13.3","prettier":"^2.3.2","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typescript":"^4.3.5","vite":"^2.5.2"},"peerDependencies":{"react":">=16.8.0"},"gitHead":"16b9ce50261f1f2b50267f35f824f43babf9e3c8","bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","_id":"use-device-pixel-ratio@1.0.1","_nodeVersion":"14.15.4","_npmVersion":"7.17.0","dist":{"integrity":"sha512-9AHfZxx/tvjtMWM7WYsZcWDCXtBi1EG+CHSZOGstOY09Ck2hwJ6WsbxFgdcLrMBKV2iX3VxbSw1v45+w9dBjJg==","shasum":"80721e59fed040f0695f99107585ea79e01a8b76","tarball":"https://registry.npmjs.org/use-device-pixel-ratio/-/use-device-pixel-ratio-1.0.1.tgz","fileCount":13,"unpackedSize":25441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLkjhCRA9TVsSAnZWagAAyiAP/jqs7/hisB2hHbQYIx8E\nczfyZIVrIrTOoeYWRwrCohr7T8svMb3Z2a+bVqd09p+8W69pqC0QxUVXeKDn\ndgy2DCMpUQs6iCCGURZ+whbTQs4+8MMva1KL1CIWiQh8dPX0u2eUXwlrhjHB\nPHbd79S1s4Ig3yO/xVBfqTr3j7xMY+YZZ/aWp+WA6jlZ/V5m2pLSnJcnDTqh\nd8P8UZE2NDJDuKhBeJ5VayromOsvtFzwmUT3PhjAm/aWHUeWa7vsOqgqJC9b\nmD1cCs3NTnXVcRqLjZXK4bxxkdJzEJ2VXdAXN/QehI2ke4BCv1jDEJoCByOi\nWjyRI6zTQkQpEzdS4VqsMclefw0KJ1jM/ssWFT4J1d/qzWFtyhi6sG5IwEDv\nT3REcmXp5ZPNoqMopPKovL2hPhefuZYgKKJoBqwtjuj8LymeqlDyuMooSq7/\nLvOWwJXBeSa64XThhUInhYSz/gTumQPzdwYPjsjdpkvEjisgamc4IAe3lry2\n+69JRfHyMwzgaCHgLsbVIsk4eWhj6HFXarUAvNTR76XQ8W4pbcp+nwuIAgQs\niJF+Ozz2rYeAA1CdoE3MymMh2obCXpru5K4ih9HNpYbQ7OBGWgOVgqToPb3S\nLEwXxtok4LkI1UAVPAedN6TqXjrhgue/hZ6OW/pqTaki5HDoHkZ1J83vyDwE\nhep1\r\n=rgsE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiUxyHrdNd9h61B2+Wv2VuOTgkT7goBB3Y5wJ0xwAO9AiAnE+DEyLJ6vD5HblslvCt3lQg/XFM1iR75NFK3JxwcKA=="}]},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"directories":{},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-device-pixel-ratio_1.0.1_1630423265651_0.7538498233160589"},"_hasShrinkwrap":false},"1.1.0":{"name":"use-device-pixel-ratio","version":"1.1.0","description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"license":"MIT","author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"sideEffects":false,"main":"./dist/index.js","unpkg":"./dist/index.umd.js","module":"./dist/index.module.js","source":"./index.ts","types":"./dist/index.d.ts","scripts":{"dev":"vite","build":"microbundle --target node","prepare":"npm run build","test":"jest"},"devDependencies":{"@babel/preset-typescript":"^7.14.5","@types/jest":"^27.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@vitejs/plugin-react-refresh":"^1.3.1","eslint":"^7.0.0","eslint-config-prettier":"^7.0.0","eslint-config-sanity":"^5.0.0","jest":"^27.1.0","microbundle":"^0.13.3","prettier":"^2.3.2","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typescript":"^4.3.5","vite":"^2.5.2"},"peerDependencies":{"react":">=16.8.0"},"gitHead":"d155f86ac049cd635458a88cc5d1f4a19a6cfbce","bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","_id":"use-device-pixel-ratio@1.1.0","_nodeVersion":"14.15.4","_npmVersion":"7.17.0","dist":{"integrity":"sha512-1c8CNimTFp8V1prGF5yLJ1WA+WGCqXlONaeQaOS2QgV7pFbJlsSYcNaxlisRcUkjZHiPI8seSRK1wY73OziGqg==","shasum":"3fb519fd8cb693adc6ceb534c888f82432346693","tarball":"https://registry.npmjs.org/use-device-pixel-ratio/-/use-device-pixel-ratio-1.1.0.tgz","fileCount":12,"unpackedSize":26726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL0WmCRA9TVsSAnZWagAASmsP+gOTPxngdqR8UYSH+4uq\nyy0kTCrZjbrRr9/c0++VXgGS4JE2TuoQtsjYHYgVIm4lfl6jrJaaDGQag3m9\n14Yr/wVZ6fHYW6aEfIH+JW7Zv5bubrjW9yOHSEniM5gC41lEX29GPQ8k0PIc\n/PVON/mcK2aQ6ljGV7FDSXlNSCZzFgT1sRje9JBLZIQHHFFfCpZ+NtWaPeqU\nBGug1FiSeQJYmxKggRPPZ8koewx58KeGxvLp+Y8bY0s+hzrI6+pThI6OojKj\nI6xokceBluO6yX7bQEXX42mTbCKozeDu+Tqv97auWkFjDukGL63Ljmu1en8y\nLIEBWdf9EHlYbGtAxQFLpjUop1ECSuDeASp4NOvKGBii9irQ5IWMOh/zrLga\nMq/OWWovGpAUBNaikhwH2Sjin1oDuSwYxF/9bgzmXiz8zyG/+TxT5WCETSWZ\nQIBiaCO3PxcWN12+pDN8ajYOH61HRny5rdVPEh2sXP0TILHoZKtuT4R0mtia\nVEpdHllrVmmvf3KvvLf2h4R+QW7dJ/HAJkz7JKla1q+IPjoog0pAi9wzLjR1\npxDiJLakggD1DttVnPeMqjWX1GxM8or2n1og2wfCOaglv4ycKOVQfTyRQAdc\n9cHwijWdEghhzM0NgyCixtbcyYrpA4d7ykN8ry4FCX6ZMmZtrvDv2/n9S49k\nUPCE\r\n=xXhc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYIAdgUOxlmK/GAJCh4oZg3YT/Hk+jQAaj99G8WGCtqAiAvfvpX6vywtJn76u799W/vmxLuyi7e6yHiE0hrraprtA=="}]},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"directories":{},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-device-pixel-ratio_1.1.0_1630487974274_0.518222135433354"},"_hasShrinkwrap":false},"1.1.1":{"name":"use-device-pixel-ratio","version":"1.1.1","description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"license":"MIT","author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"sideEffects":false,"main":"./dist/index.js","unpkg":"./dist/index.umd.js","module":"./dist/index.module.js","source":"./index.ts","types":"./dist/index.d.ts","scripts":{"dev":"vite","build":"microbundle --target node","prepare":"npm run build","test":"jest"},"devDependencies":{"@babel/preset-typescript":"^7.14.5","@types/jest":"^27.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@vitejs/plugin-react-refresh":"^1.3.1","eslint":"^7.0.0","eslint-config-prettier":"^7.0.0","eslint-config-sanity":"^5.0.0","jest":"^27.1.0","microbundle":"^0.13.3","prettier":"^2.3.2","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typescript":"^4.3.5","vite":"^2.5.2"},"peerDependencies":{"react":">=16.8.0"},"gitHead":"10682b7de81deee238cb293e52597855da3d9486","bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","_id":"use-device-pixel-ratio@1.1.1","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-7sYHio8TzAi45DtIN4V/wN8u3+J0zEyLIffi98CAOHSv9QPFnBaqGqJ/jhR4ZU0p6LDrQiTFHZJnCqCyOl0GmA==","shasum":"42d66997ab10f01f7890f44f69e160e742f2d1c5","tarball":"https://registry.npmjs.org/use-device-pixel-ratio/-/use-device-pixel-ratio-1.1.1.tgz","fileCount":12,"unpackedSize":33076,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjpteQNfGQ3P3iiJgNppxSGzIAWc9+zDC1whZ8sHF4SwIhAM0ZS4p75hDvs/J1sziS6qTQ0O/bibx265oW473KX/la"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMHeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwlBAAjw2Y58DZ43ejPHMOs1w8nAI+3u2iZJX/JphHqxkVw59OhGko\r\nt9BwbtAoupkQonfK4RJ677p4WSSRtiM3HGLNErhbyC5cOV7KO/j8YxQ831Ih\r\nYuMz1YPvuNGUvxP4xvS7K0GnXdBsq8BVzv00ScXfPoWpcfQHCernQZdFBQvI\r\nhyTh1AjZJiTP3Ho1b7Suw/Ph0NSOSwBydniPX2qyfHFakl+h1F8VYqDHMvXS\r\n0xsLX6MdCAq1pUKSBHEsgDdP4dDX7VygB5f3z67jrHbgRmkdJem5+kzc8nAQ\r\nrno418GkOLVVPwKThLcbzmrFxXALTQTQPy/7CWwRDEOuyvlWqsRuc6vYAlk0\r\nCxp0KqpFrDqc4kODKYS6jlJJXBUPopoO+lkr2SzbHOH1jFSUV0JWE9ZPu6VY\r\n/UDmBaCwwJyfRBQ3SP5HiRBNUdIpL1HYt2AWG16Tq6sdL2XvX8a9t5wdWPXn\r\nCnYa+ghBqFhVLUnD7L8BVS5SnhoKmCmApPKvODQxiz+t3WDmhm4VhmHIt+Cf\r\nq8P4b72EOu5yWsIGdxU0u5XGBOvP9OU3EOCRffFVa4mlxTftYqWovCfG6KAC\r\nkQH11XBBH0RnMjN377eA7jq79jJ4GMK/nu28DC7XtJo9YSzXNL9cwamWDjam\r\n+WRUagudpKfTlnYc208HgJcD/UBbcomZJCs=\r\n=h594\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"directories":{},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-device-pixel-ratio_1.1.1_1670955486086_0.4536795447851871"},"_hasShrinkwrap":false},"1.1.2":{"name":"use-device-pixel-ratio","version":"1.1.2","description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"license":"MIT","author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"sideEffects":false,"main":"./dist/index.js","unpkg":"./dist/index.umd.js","module":"./dist/index.module.js","source":"./index.ts","types":"./dist/index.d.ts","scripts":{"dev":"vite","build":"microbundle --target node","prepare":"npm run build","prepublishOnly":"npm run build","test":"jest"},"devDependencies":{"@babel/preset-typescript":"^7.14.5","@types/jest":"^27.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@vitejs/plugin-react-refresh":"^1.3.1","eslint":"^7.0.0","eslint-config-prettier":"^7.0.0","eslint-config-sanity":"^5.0.0","jest":"^27.1.0","microbundle":"^0.13.3","prettier":"^2.3.2","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typescript":"^4.3.5","vite":"^2.5.2"},"peerDependencies":{"react":">=16.8.0"},"gitHead":"b9f47662cf5865eafe1363b766b7023963aa697c","bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","_id":"use-device-pixel-ratio@1.1.2","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-nFxV0HwLdRUt20kvIgqHYZe6PK/v4mU1X8/eLsT1ti5ck0l2ob0HDRziaJPx+YWzBo6dMm4cTac3mcyk68Gh+A==","shasum":"e936b99d4037ff1028ac1ac2b5b2ef02ac55f91d","tarball":"https://registry.npmjs.org/use-device-pixel-ratio/-/use-device-pixel-ratio-1.1.2.tgz","fileCount":12,"unpackedSize":33115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDPEVtSIdnD0RA/OXwL17E/oP4qeiv5SXyu4+Xa78ZYfAiEAuckzP5lOQ2Xyth/J5NoRNaMNvBixIs/fVpPZdxQLkbI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMIlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVug//QU1qljJkFacuDiaw5gFTcqg8DNv7ALg6kkR2ZhlPprH/DA5M\r\n6CBN7wdyKb6v0SAPa2mE2DkiXOZ6OB8nmEDvwo7VzlZBYSvnNbgIMC8ImzS6\r\nF9utWR1z01kPFniRBcUPNt/MGi3WfsHRycOu7S5Egn+vad2XQ/Lezv84SnsO\r\nJare9xklVPapBDsLL6n82rh2So7gQ7gkAsK4Yl6ji3yJGeN/MpZmvZHcR0bY\r\nOjtEmqKJQH3ZlgefgtEYLSOj29rjK2D+kYy+PnDE74eAgH8zpCubn86pD0FM\r\nVci60MySxRjOIdHVRCGlwaFMUb4ykdJFxA560fx1eWtf8eyGtsoBm7wVch5S\r\nclzKANv1hrodNUMOVynQ8eN7k+s+nyiRrxPAhUPFXadWtucqq3OM2v1JXlxN\r\nEso4lZXv8IKETEzT7dqXJVtYeXZ2ER3jZ1IGvSHnSDkYyzDvMYm9lYbSI0CF\r\nHUIu0xog/i7V8tizjt+hRus185okgC/foSzM3pIQeI4RU3AfFVcAkCCZth9x\r\n+G9RMJpu2BlY89IpH+6PGp8KQJwECZz8e6NSNiqjSlKX9WdRm5LihT3rCKoj\r\n1HzFXp+Jv/j8GD/hL6wcoWtnqOF+J8qDSgOWdwGbMTHDpbrZ4NpzDLFYaZuZ\r\n644hl7xEj86kWmKea7W/qu28L2f2dJhj600=\r\n=qQbH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"directories":{},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-device-pixel-ratio_1.1.2_1670955556886_0.08513508699267947"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-31T15:19:12.855Z","1.0.0":"2021-08-31T15:19:12.991Z","modified":"2022-12-13T18:19:17.166Z","1.0.1":"2021-08-31T15:21:05.768Z","1.1.0":"2021-09-01T09:19:34.405Z","1.1.1":"2022-12-13T18:18:06.242Z","1.1.2":"2022-12-13T18:19:17.038Z"},"maintainers":[{"name":"rexxars","email":"espen@hovlandsdal.com"}],"description":"React hook for finding device pixel ratio (DPR), optionally capping/rounding","homepage":"https://github.com/rexxars/use-device-pixel-ratio#readme","keywords":["react","hook","dpr","dpi","pixel"],"repository":{"type":"git","url":"git+https://github.com/rexxars/use-device-pixel-ratio.git"},"author":{"name":"Espen Hovlandsdal","email":"espen@hovlandsdal.com","url":"https://espen.codes/"},"bugs":{"url":"https://github.com/rexxars/use-device-pixel-ratio/issues"},"license":"MIT","readme":"# use-device-pixel-ratio\n\n[![github status checks](https://badgen.net/github/checks/rexxars/use-device-pixel-ratio)](https://github.com/rexxars/use-device-pixel-ratio/actions) [![bundlephobia](https://badgen.net/bundlephobia/minzip/use-device-pixel-ratio)](https://bundlephobia.com/result?p=use-device-pixel-ratio)\n\n`useDevicePixelRatio()` is a React hook (and utility) that will tell you what the current device has as its Device Pixel Ratio (DPR). The hook is reactive - if the browser window moves to a different display with a different DPR, it will update automatically. If you only need to get the DPR statically, there is a function (`getDevicePixelRatio()`) equivalent.\n\n## Installing\n\n```\nnpm i use-device-pixel-ratio\n```\n\n## Server rendering\n\nWhen rendering on the server or in browsers that do not support the `devicePixelRatio` property, it will default to `1` unless overriden by using the `defaultDpr` option.\n\n## Rounding/limiting\n\nThe hook (by default) both rounds and limits the DPR - it will round _down_ by default, and cap the number at `3`. In other words, you should by default only have three values returned: `1`, `2` or `3`. To allow larger DPRs, pass a higher number to the `maxDpr` option. To prevent rounding, pass `round: false`.\n\n## Usage\n\n**Default usage**\n\n```jsx\nimport {useDevicePixelRatio} from 'use-device-pixel-ratio'\n\nasync function MyComponent() {\n  const dpr = useDevicePixelRatio()\n  return <img src={`https://my.image.host/file.jpg?dpr=${dpr}`}>\n}\n```\n\n**Setting higher limit**\n\n```jsx\nimport {useDevicePixelRatio} from 'use-device-pixel-ratio'\n\nasync function MyComponent() {\n  const dpr = useDevicePixelRatio({maxDpr: 50})\n  return <div>DPR is {dpr}</div>\n}\n```\n\n**Getting the \"raw\" DPR**\n\n```jsx\nimport {useDevicePixelRatio} from 'use-device-pixel-ratio'\n\nasync function MyComponent() {\n  const dpr = useDevicePixelRatio({maxDpr: +Infinity, round: false})\n  return <div>DPR is {dpr}</div>\n}\n```\n\n**Setting the default DPR**\n\n```jsx\nimport {useDevicePixelRatio} from 'use-device-pixel-ratio'\n\nasync function MyComponent() {\n  const dpr = useDevicePixelRatio({defaultDpr: 2})\n\n  // Actual device DPR if available, 2 otherwise\n  return <div>DPR is {dpr}</div>\n}\n```\n\n## Function usage\n\n```ts\nimport {getDevicePixelRatio} from 'use-device-pixel-ratio'\n\nconsole.log('Device pixel ratio is ', getDevicePixelRatio())\n\n// Or, with options (same options as hook):\nconsole.log('Device pixel ratio is ', getDevicePixelRatio({maxDpr: 5}))\n```\n\n## License\n\nMIT © [Espen Hovlandsdal](https://espen.codes/)\n","readmeFilename":"README.md"}