{"name":"@emotion/weak-memoize","version":"0.2.2","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/packages/weak-memoize"},"publishConfig":{"access":"public"},"browser":{"./dist/weak-memoize.cjs.js":"./dist/weak-memoize.browser.cjs.js","./dist/weak-memoize.esm.js":"./dist/weak-memoize.browser.esm.js"},"_id":"@emotion/weak-memoize@0.2.2","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"integrity":"sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA==","shasum":"63985d3d8b02530e0869962f4da09142ee8e200e","tarball":"http://registry-npm.ywwl.com/@emotion/weak-memoize/download/@emotion/weak-memoize-0.2.2.tgz","fileCount":10,"unpackedSize":3956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8/95CRA9TVsSAnZWagAAHFIP/0zbcbMCtpza+UZQhTDA\nj6ZkFukQ21WSz1ng6YEftdDqcDBBWPAweQCJObeVAreFYYWpuDgRfQOgOihf\nbXBEsUHV+T7KZk6EHKCZHFjHUOhkAKVRiRApOQpFsKcg5PfaUfBuWgg7Ego0\nhpka+qXWXKo3va6XDU8c/hZctaK38fG4jOzHfO/TKJCbEcTU4Cm1UkvJhe06\n/dUjcIAb1/rHtPGEPB1l0XZXixscS5KmJQcrOiuzx9ohy/+5utVDmlUdnJey\ng+OFpIf1vZ0sBmZXihSwTDE/Sw+CvjZzmv+zK1VO9ILme5eWMppudwawa/OR\nkUn6E2IwXc4iERqMw2Pdk23wtA2pIFIpogFB6mTXGFPK9OvgplPpKJkKTp7+\n8RkjY/Aja4CA/7C79bPUaNLZqnpkoTA/rxq4/idNZJEzW3HJzLVQv6fBEEOs\nYTEMDFG3CYSPGWe3KoVGjyIHOkcZV4w71OWuDKTs2jQ5sYG0deLLNC0nCB8S\nrMbOHYdfPpLjopuUVc9aiGzvHOW/rLLFCPfScZtaSJ/Eil5ahoSGfT7lhAD6\nC9qOUZoNIRwrs7HSn/TCgrN53A7pCXHV9yYEtuwHL5YPlpsL4sH8fwS3OUYX\nwbe0Hb8U0YVWBeeGhtXKKiH6r7u67/EXLoaSb0e1vGjCTwGNfZAvF/VzA8CP\nKt4+\r\n=6FIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqcwjhurZoexu6WmVruS47yeCXxEAQWkSObMdz0ATquAiEAxTDh+O7EZe4ZmHZCqBG+3ezSdAt/tZElBwYlfAzSeU4="}],"size":1341,"noattachment":false,"key":"/@emotion/weak-memoize/-/@emotion/weak-memoize-0.2.2.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.2.2_1542717305165_0.4829496182285382"},"_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":1542717305280,"_cnpm_publish_time":1542717305280,"dist-tags":{"latest":"0.4.0","really-unsafe-please-do-not-use":"10.0.0-really-unsafe-please-do-not-use.2"}}