{"name":"@emotion/weak-memoize","version":"0.1.1","description":"A memoization function that uses a WeakMap","main":"dist/weak-memoize.cjs.js","module":"dist/weak-memoize.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/next-packages/weak-memoize"},"publishConfig":{"access":"public"},"files":["src","dist"],"umd:main":"./dist/index.min.js","_id":"@emotion/weak-memoize@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"integrity":"sha512-g5OCOsRfheQ9CtQVPJkv8IBpB6Lc4/etLJqUIPEuO6ZraPNRW9uJ99gUoU5hkT1icTi3SVL8Dqdo8pKb9ilcTg==","shasum":"af1621e74f9357a3514776907c096c1a63ae9c26","tarball":"http://registry-npm.ywwl.com/@emotion/weak-memoize/download/@emotion/weak-memoize-0.1.1.tgz","fileCount":11,"unpackedSize":4737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSsgDCRA9TVsSAnZWagAA82wP/2ypyrANYjego1AODMw7\n0GdSiLe+guSl89CnqOdn3u/WKigh+MYtZAevLQAmSuxQHQsgqC7hEWvBCG/9\nkWsdxEMxB6ZVCqSZcHq50UlGhML7iDVb8PqoOfKonw4HB389DJ50MGClW5MB\nF0Mh3Z8AZy4nyL83P1nxk0ekuUsUI0S65TlR0U1xb+RIxitmXX2p8CQlB/e5\n3cbbBEvJreO0AwYsd7+JE387Hf/6eODoKwiXJBNwmF+u4F1pdHRuGTdBi8xI\n+S2I6+gC4AtucyN0jQZS9HJDQeLS38tzNM8GzGOEfYAAm14AYIAn6FYEPHx2\n2ozFZd7wAiB2sC7WYCPKovsWzKFbMg33dbgpN2jdlgSTPGpF+ziJI3xEhXKx\ngZckOTJxjpbgsdUC4CsJKlrx7f4s3XpyvNJWUDHcrla3v4XPH4um4qeAh2kC\njvq4b2E/s4nXVJvuoNrpLUGpa3mfz49LvY+00Qd4zrW1PAsLxdGkD0ouQD4r\n2We+Q32VPP3J3R4VibU2Dmk3OTw2nYyFaaYiLYUgT2kTW71eJ8PSMRbx619k\niZcYhWcbwkpQErfwuTbkHLcsLjjE1VmvxdZGDz2k1ShIqvWc9D+l+8yAPHZL\nsc+GfNjj2YeGzU47YvXS5ZwVXtzI3WYp3XGjYZiAG6s695vgI5Mz5EBpmDNr\nhFhV\r\n=Cm2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXqyDhCVRA60Xdnhhs672uVXftcz6EAgOKjPZjqh5oMQIhAPxPGZVYZr9DRCW8Ffiwnbw5VHyQL6v6ZmrLcGa320lg"}],"size":1709,"noattachment":false,"key":"/@emotion/weak-memoize/-/@emotion/weak-memoize-0.1.1.tgz"},"maintainers":[{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/weak-memoize_0.1.1_1531627523783_0.7755800347580133"},"_hasShrinkwrap":false,"readme":"# @emotion/weak-memoize\n\n> A memoization function that uses a WeakMap\n\n## Install\n\n```bash\nyarn add @emotion/weak-memoize\n```\n\n## Usage\n\nBecause @emotion/weak-memoize uses a WeakMap the argument must be a non primitive type, e.g. objects, functions, arrays and etc. The function passed to `weakMemoize` must also only accept a single argument.\n\n```jsx\nimport weakMemoize from '@emotion/weak-memoize'\n\nlet doThing = weakMemoize(({ someProperty }) => {\n  return { newName: someProperty }\n})\n\nlet obj = { someProperty: true }\n\nlet firstResult = doThing(obj)\n\nlet secondResult = doThing(obj)\n\nfirstResult === secondResult // true\n\nlet newObj = { someProperty: true }\n\nlet thirdResult = doThing(newObj)\n\nthirdResult === firstResult // false\n```\n","publish_time":1531627523831,"_cnpm_publish_time":1531627523831,"dist-tags":{"latest":"0.4.0","really-unsafe-please-do-not-use":"10.0.0-really-unsafe-please-do-not-use.2"}}