{"name":"@emotion/weak-memoize","version":"0.2.3","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.3","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zVgvPwGK7c1aVdUVc9Qv7SqepOGRDrqCw7KZPSZziWGxSlbII3gmvGLPzLX4d0n0BMbamBacUrN22zOMyFFEkQ==","shasum":"dfa0c92efe44a1d1a7974fb49ffeb40ef2da5a27","tarball":"http://registry-npm.ywwl.com/@emotion/weak-memoize/download/@emotion/weak-memoize-0.2.3.tgz","fileCount":11,"unpackedSize":4225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEqmECRA9TVsSAnZWagAAS+IP/1eojXQmpebUWhJs0oI7\ntRmWke/Pcs82zEoe9wLU+sgs4f8SkLkC2Gfls6Cfy1Fli60f/Aq37CXKu1bh\nbo8y2HWHRMqJZKigIvb7ufRYbRDyM9eQ82Av7OUOCc5OMIOFrkHF3q6rk1gM\nuGiI3A4n9JulpM73eey6EX5fyMJeYo9gdoQcOlCGxRVicRHeVNxFdlH4JJzo\np/PSSZw2FOz11/PJMtszrem2mGwKAnVV3i4z63Kx4xMvwnxFy60YZvh9i2bx\nofxWLXH4kkMnYJXIqQD/fSGnRok3ZIUXnw9pSupadQw+Kdx5kxLvw8yFgVL5\nlcnpyfs6bMpTcIcIPRKYLSCJ/JlXLu6YiThuG4SkOgzYRcp7oXkONC2RomIt\nYGPoVRwAYKKLWG8FghWlJutz9SReEAOS05oJDwKjKn0HTmn0lfGZXZo5tLF8\nAa1MDb4YhhHWnYn34y9XQRSw8U1kNSNKcVVcAb2mSmDXtUm5QuFotOE1v0cT\ntGA1916rEPPrCkw9nd0lcHmI2kP06+ZasYSEFnjiJ9VtfzVPwGXBY28LN1yn\nRNuw/Uj+bFOmjYpcaTdRrx8UgGBc6UIta4GW6UGDXsn+lCrMuG/j5jufJWBT\noKZNZMGLJqrIQEcgl5V8KI5UoQJ+5x+lSMj2vHYi5+DBjN1c96w+IBzhD4fv\n6AGV\r\n=kXTe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdmGSL6j4OMZOUb8+uBbHZVE3vu1FN1rIKh02QO8weFAIhAPT1n097+H9RRDya8Ee1Dg5Or/Mdr7oMCPHGiWt792WC"}],"size":1477,"noattachment":false,"key":"/@emotion/weak-memoize/-/@emotion/weak-memoize-0.2.3.tgz"},"maintainers":[{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/weak-memoize_0.2.3_1561504131851_0.031710078172015654"},"_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":1561504131962,"_cnpm_publish_time":1561504131962,"dist-tags":{"latest":"0.4.0","really-unsafe-please-do-not-use":"10.0.0-really-unsafe-please-do-not-use.2"}}