{"name":"@emotion/weak-memoize","version":"0.3.0","description":"A memoization function that uses a WeakMap","main":"dist/emotion-weak-memoize.cjs.js","module":"dist/emotion-weak-memoize.esm.js","types":"types/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/emotion-js/emotion.git#main"},"scripts":{"test:typescript":"dtslint types"},"publishConfig":{"access":"public"},"devDependencies":{"@definitelytyped/dtslint":"0.0.112","typescript":"^4.5.5"},"exports":{".":{"module":"./dist/emotion-weak-memoize.esm.js","default":"./dist/emotion-weak-memoize.cjs.js"},"./package.json":"./package.json"},"gitHead":"a5f43a1ba3dae5141b9c356b8b7e13f7023895b3","bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"homepage":"https://github.com/emotion-js/emotion/tree/main#readme","_id":"@emotion/weak-memoize@0.3.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==","shasum":"ea89004119dc42db2e1dba0f97d553f7372f6fcb","tarball":"http://registry-npm.ywwl.com/@emotion/weak-memoize/download/@emotion/weak-memoize-0.3.0.tgz","fileCount":14,"unpackedSize":5226,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEOugMrotYwpZjzppg+BEmRzeLHKREwKUfUNeOBXiWS1AiB1Rd4PbQunvZ1GUHFJGsaovxTJnT98jNKETPSgeMX22Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5kYdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqnbg/8D2v1bC+K9BhZdZ9qYkd+Gk4OK+aflbUdYxDVgWtVQzV/dswo\r\naWiGMM2foIWr5mmKTnFDa4FVUvQkMiBbKi69vEmNiAvSKqyXWXqSxi5Q35V0\r\nq8YkpC5cKRJC2CX7/nXwyjRsPW2mX0doo+WPYP4Xc7pi5VwB48Haxxh+85Yv\r\neqjLj3F2YA7koFitnLhUjz6YWq6J8Hix8HBj41oGwbsIImLhLyzBTIfmUAtL\r\naJHrBGb4V1RJ0YNmOhcl//i7d5VwYvN4FoXtl4iGCOVu/UYQBXV7fqh4FdqV\r\ntSUYLpNrZYezwkTfcvvQbSY+ZnGTEoBF+sAeu30z6nO0X3Lsl6R893Gr84cd\r\nuHcDfZNbbr8JFx8MMi5vXTeAQGsz9M1yqDYBS6k/9MVHzcNBQMiXgC2CqWzY\r\nXvrVxwQSjcYlRwE0MSCB0vQj515cAJv+ZLIa9kcuH73+Mnc2odyB9OQiyqi2\r\nGGlNOavzMLJyfaF9L9xzMjSQXDTVQOUZZ1rcQnCUJMgfp0eYQ61WDz/Goud0\r\np4No5D+xWbhPHpgMvnI5Z8IBDYVckgs9W2UJpQqas2B//E2F3cE7bjifBrm9\r\ne3WxRVF5lvcOozn6IplQGAiU8+a4SzBpQxfw7BXIi6YZVtO0Y5ZdtVS4O0gi\r\ne22vd7EmBWpDAhVWfP3bQR/7HUzoQWLAX8U=\r\n=5bU5\r\n-----END PGP SIGNATURE-----\r\n","size":2188,"noattachment":false,"key":"/@emotion/weak-memoize/-/@emotion/weak-memoize-0.3.0.tgz"},"_npmUser":{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},"directories":{},"maintainers":[{"name":"tkh44","email":"kye.hohenberger@gmail.com"},{"name":"mitchellhamilton","email":"mitchell@hamil.town"},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/weak-memoize_0.3.0_1659258397582_0.5529126217240707"},"_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":1659258397807,"_cnpm_publish_time":1659258397807,"dist-tags":{"latest":"0.4.0","really-unsafe-please-do-not-use":"10.0.0-really-unsafe-please-do-not-use.2"}}