{"_id":"@bjornmosten/react-native-expo-image-cache","name":"@bjornmosten/react-native-expo-image-cache","dist-tags":{"latest":"4.1.0"},"versions":{"4.1.0":{"name":"@bjornmosten/react-native-expo-image-cache","version":"4.1.0","description":"React Native Image Cache and Progressive Loading based on Expo","main":"dist/module/index.js","react-native":"dist/module/index.js","types":"dist/typescript/index.d.ts","scripts":{"prepare":"bob build","tsc":"tsc --noEmit","lint":"eslint src/**/*"},"repository":{"type":"git","url":"git+https://github.com/wcandillon/react-native-expo-image-cache.git"},"author":{"name":"William Candillon","email":"wcandillon@gmail.com"},"license":"MIT","keywords":["react","image","cache"],"bugs":{"url":"https://github.com/wcandillon/react-native-expo-image-cache/issues"},"homepage":"https://github.com/wcandillon/react-native-expo-image-cache#readme","devDependencies":{"@react-native-community/bob":"^0.4.1","@types/crypto-js":"^3.1.43","@types/lodash":"^4.14.134","@types/react":"^16.8.20","@types/react-native":"^0.57.63","eslint":"^5.16.0","eslint-config-react-native-wcandillon":"^1.2.2","expo-file-system":"^5.0.1","expo-blur":"^6.0.0"},"dependencies":{"crypto-js":"^3.1.9-1","lodash":"^4.17.4"},"peerDependencies":{"expo-blur":"*","expo-file-system":"*","react":"*","react-native":"*"},"@react-native-community/bob":{"source":"src","output":"dist","targets":["module","typescript"]},"gitHead":"5d71fdb632cc31a9b5d2c04d159c3ded4fe96793","_id":"@bjornmosten/react-native-expo-image-cache@4.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-LwukzimpguiHCZZBj0tl3HnMLQYnlkKYbd1vaQcv8pAQzCyMCQsdy0k+Jb1wcvS3z4My+JcIlf1crMrfUKkwaA==","shasum":"e72bbbeea1400d7dab1e4674096acac4921abc91","tarball":"https://registry.npmjs.org/@bjornmosten/react-native-expo-image-cache/-/react-native-expo-image-cache-4.1.0.tgz","fileCount":18,"unpackedSize":44372,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDH6xZ5IQxEy2A4AkO+75wq6BNFhmQ5pBoS56+8anXOwwIgXpZKKkBTsQJnWSk6WOomWlsgXEKL0jApwQM6Rjz2nPo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaBkYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4tQ//SVJf/RUKgPA7odEUxk5p3GjHKEHNWXE7NyXldaVBbDHzytDj\r\n3RKul25bvggfp4C/ymNSIF/g8vGiBLVUdGBr32igWepNxofi2GbX17zWuXmG\r\nSeo0ZC2x4qiorpAFrosuVERHk5r/R6nnyK52DHdIf670gstpnfS+DJw0pygS\r\n0tE5fdfw9hKGlNEgccu8mUjrk/HUcg6e1TIEMyPpx41WzioIDFyo9n09qCgu\r\nybpz/lVIyrXIl3rA4SwC/Ihd+Fz6GGQDvTEJjSJsUI4fwzLUViu9sy2iMxlV\r\nNN/qA2VG4/fcVrPn3cOl8jH7HuGR0ZkNFzMgViQPe7P8+9ofmWRjBQVF52RB\r\nelq4B0TmXOzjn8Sz0pGtNuspTADxg2SMMjhEUQ/QtDN+svNGRfYQqUyZVHZo\r\nQVdVGQWwCeSUlsMxnaQtKI5D2L3tftd8XVyHF+OW9wfsMuu0VHmTrFwbPVKp\r\nVQ0zDgdOPHIYOBFXWFzWoGCO/jTUAlWf5bJlHn5RVynpPX6iT+HXktE06Cqv\r\nrvl3yy7nSYx8krBblsSuVNuqRjvHYVJhVEBInaCUw2tfxSSJOWm+vjpn7M01\r\n1E+GMqYaSarWveOgfIHSv8hvYtLUcMS5aDVGm8Y0xtdULJaHW7YFA+xlsbB4\r\nq2SWZL2dQ58bYJfgePB5S40OA79OsubY610=\r\n=SREo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjornmosten","email":"bjorn.mosten@gmail.com"},"directories":{},"maintainers":[{"name":"bjornmosten","email":"bjorn.mosten@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-expo-image-cache_4.1.0_1667766552725_0.8442242443814163"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-06T20:29:12.682Z","4.1.0":"2022-11-06T20:29:12.916Z","modified":"2022-11-06T20:29:13.061Z"},"maintainers":[{"name":"bjornmosten","email":"bjorn.mosten@gmail.com"}],"description":"React Native Image Cache and Progressive Loading based on Expo","homepage":"https://github.com/wcandillon/react-native-expo-image-cache#readme","keywords":["react","image","cache"],"repository":{"type":"git","url":"git+https://github.com/wcandillon/react-native-expo-image-cache.git"},"author":{"name":"William Candillon","email":"wcandillon@gmail.com"},"bugs":{"url":"https://github.com/wcandillon/react-native-expo-image-cache/issues"},"license":"MIT","readme":"# React Native Image Cache and Progressive Loading\n\n\n[![CircleCI](https://circleci.com/gh/wcandillon/react-native-expo-image-cache.svg?style=svg)](https://circleci.com/gh/wcandillon/react-native-expo-image-cache)\n[![npm version](https://badge.fury.io/js/react-native-expo-image-cache.svg)](https://badge.fury.io/js/react-native-expo-image-cache)\n\nReact Native image cache and progressive loading for iOS and Android. Based on Expo Kit.\n\nThis is a component used in the [React Native Elements](https://react-native.shop/#elements) and the [React Native Fiber](https://react-native.shop/#fiber) starter kits.\n\n<img src=\"https://firebasestorage.googleapis.com/v0/b/react-native-e.appspot.com/o/2018-01-28%2017_36_46.gif?alt=media&token=6afaef74-454d-4c04-85ab-be410d0b225b\" />\n\nCheckout this [medium story about react-native-expo-image-cache](https://medium.com/@wcandillon/5-things-to-know-about-images-react-native-69be41d2a9ee).\n\n## Installation\n\nThis package has a peer dependency with React, React Native, and Expo.\n\n```\nyarn add react-native-expo-image-cache\n```\n\n## Usage\n\n### Props\n\n| Props        | Default     | Options  |\n| ------------- |:-------------:| -----:|\n| tint      | dark | light, dark, default |\n| transitionDuration     | 300      | custom in ms |\n\n\n### <Image>\n\n```js\nimport {Image} from \"react-native-expo-image-cache\";\n\n// preview can be a local image or a data uri\nconst preview = { uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\" };\nconst uri = \"https://firebasestorage.googleapis.com/v0/b/react-native-e.appspot.com/o/b47b03a1e22e3f1fd884b5252de1e64a06a14126.png?alt=media&token=d636c423-3d94-440f-90c1-57c4de921641\";\n<Image style={{ height: 100, width: 100 }} {...{preview, uri}} />\n```\n\n### CacheManager\n\nGet the local image from a remote URI\n\n```js\nimport {CacheManager} from \"react-native-expo-image-cache\";\n\nconst {uri} = this.props;\nconst path = await CacheManager.get(uri).getPath();\n// if path is undefined, the image download has failed \n```\n\nYou can also clear the local cache:\n\n```js\n\nimport {CacheManager} from \"react-native-expo-image-cache\";\n\nawait CacheManager.clearCache();\n```\n","readmeFilename":"README.md"}