{"name":"@emotion/weak-memoize","version":"0.3.1","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","import":"./dist/emotion-weak-memoize.cjs.mjs","default":"./dist/emotion-weak-memoize.cjs.js"},"./package.json":"./package.json"},"gitHead":"1135f8e9d97ea711eb483368313afdfe7b176845","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.1","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==","shasum":"d0fce5d07b0620caa282b5131c297bb60f9d87e6","tarball":"http://registry-npm.ywwl.com/@emotion/weak-memoize/download/@emotion/weak-memoize-0.3.1.tgz","fileCount":20,"unpackedSize":6076,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHXQmn6yom0sZNXuXxNKvq6+2cLBQiDIpMmBP9LLX12AiEAw282Aw72Slk1yZfaFibQQqr4THcJHCKDaZtWIdRj1/Y="}],"size":2486,"noattachment":false,"key":"/@emotion/weak-memoize/-/@emotion/weak-memoize-0.3.1.tgz"},"_npmUser":{"name":"emotion-release-bot","email":"emotion-release-bot@hamil.town"},"directories":{},"maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"},{"name":"emotion-release-bot","email":"emotion-release-bot@hamil.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/weak-memoize_0.3.1_1683362957066_0.9312830075790961"},"_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":1683362957225,"_cnpm_publish_time":1683362957225,"dist-tags":{"latest":"0.4.0","really-unsafe-please-do-not-use":"10.0.0-really-unsafe-please-do-not-use.2"}}