{"_id":"@protoplasm/recall","_rev":"6-64cf7271347a93affc90195bdf7e21eb","name":"@protoplasm/recall","dist-tags":{"latest":"0.2.4"},"versions":{"0.1.0":{"name":"@protoplasm/recall","version":"0.1.0","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^26.0.20","jest":"^27.3.1","prettier":"^2.2.1","ts-jest":"^27.0.7","typescript":"^4.1.3"},"gitHead":"41a3c92935e6f9021ea1efdb43e0a1fc0f61944f","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.1.0","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-I4ZWfZRQH1oXhsA9Mgnjm/9OkOf7ILKqNUwbEcC4tdJxoGCWsorpRcv4GsqFQR0N1v983QBabuBRSsWHT2YT0A==","shasum":"1113ab8d4ac6b8b51a4e7e28b729afdee3c2bf1b","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.1.0.tgz","fileCount":37,"unpackedSize":51155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh76zbCRA9TVsSAnZWagAA4j8P/1m7mOfC6o5byMNKbieP\npIfLtw8xAB9sjtjTdNwm6LSqvmZmUWSKP2gjhbIiUJThIBDrtUZjs7Hbt0hR\ntyCdUGAaSiPWdG/fv6Mqu+JFGjNy8OWzW/kHlWO2hjs89tF6lA5jWKtTNK7q\nufvNNdpz14pePKCw9hT+jUMS434NdlA4Tf8/M6Znde6eFdTqHYPvkakPv6+0\nxH7edwiQhOgjHcM4gVqfmL+TwNY9RKGkzqEUv5Ey5UHHY4/S3qo6Y/2ye+Oz\nXKcTe9FfAi7rYzfCq/pypyH8s0ikxd/VtfXJ+wR8jPyXVlu/jLZ+IhnEAij/\nSpDQmSiGpifGIXqRQrpUzH9D2raAbr9TE4mhlr30H40FCm1TbH30MhxkxWHa\nLCzPwPGVmbFd95B3GUO3FReFrMjvEsVEewOwCj1Bl8+8e2BZ3eFjfVZQ/LvO\nYX0h8w8thDIM0i0atpdjJkZMXxkxL7yBANvF2jkHqP+UM1qEc/l76FXsdS9E\n3X0GY7gDtl7SVMA1gijsWNk9DezAuVKk7NMtR6smpwNmN1jTnOS6UtDXhTdY\nIzDkKn0lo2+BcBPH2Gna51cQHkCTbzr9jugjf7Qr/uPd3/GKj3ta06gH2He0\nreEthuADXoeHMETPYOcLZXVR3QvYC9KSPcTJKPAaTfQOwKL3bG7bfuLj1UrU\n2cmI\r\n=xRQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmBFhGw0aWiiTt0p/EqCsUVw2xVaJfAApVrSuEsKBrDAIhANkTMQKXyVBzu3U3C4JZu0TrRcKDWutoUyMYPD8zLeiu"}]},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.1.0_1643097307818_0.6819877528321519"},"_hasShrinkwrap":false},"0.2.0":{"name":"@protoplasm/recall","version":"0.2.0","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^26.0.20","jest":"^27.3.1","prettier":"^2.2.1","ts-jest":"^27.0.7","typescript":"^4.1.3"},"gitHead":"0aeb4821d9cdf2bc3b06b5409c5ca094edc73d2d","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.2.0","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-c1uOEnKwGLssLn2OFHJThu2JSxhEEUSnPfwT173EBgtF7Wota2ur1pIuVqUCv+7ar+jkG1kcsWwekGqmyRfelQ==","shasum":"740e576a5c6de6a19223d4171e3886f1d4f7a606","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.2.0.tgz","fileCount":51,"unpackedSize":78320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPM6lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoExA/+JUTI+meO/87kDj5+uRDuk8+nVVcHahHT7PUlWo5mlWSVoq6b\r\nl0rnSw11bVBLNPJxPdN8FPHkhD2bVGPOxp0mpXpCmusPYb6YCg4zgeYhXl+n\r\nlKe6yh3Xk7SUbWqHNuyIj6eewErg/bQ3IcstBAc80eL8RTIyGvn35frT1ITa\r\nS1JtZTQB7+8URtF1TYxuldUFjW7t+aa4R8t6ZBfheBDEezD1d0o6DGIbuD/x\r\nb6VU6498kX9u0qoR1hCjSj9yZQ8dgYQk3akHOr7NPSDi2jbZbxdAkFl4Bym2\r\nRPQn+e18eZlx3phZwK4dsSg90RcNLMjWW+BIZvLM5BCeKnIK58klOEyqs/PG\r\nDYQyeXjafDIhViEPyz6CXP5eOGSnumwnePQzVzCploWuqM1i+MwXm9d3sNd/\r\nPYOfrgXBWWS+xHeFQVJUCucxQmPUx4PRHg8G5iMiDZAlCWNwnQRBfzyY/ZpE\r\n7Wpdca1UXC0d/tTEsWllcOvZ9OZwcqlcSaw+W9ZfxnHwThu/FqDdl42HSY79\r\nXRRpNSOjK+nL+uxmcaEPFrBbBqy3CDrzuoQAPm1sXw9qajaSXzvVL6zp/BTm\r\n3A9DLRLnPfwu/UW3qGrVz9EErl0tM3BaiHfaHrS+65L1Nnc7ElFj9D2Cdnxd\r\n7iidUvXPNRDjiy/tPjxUsw2hPuEwHNl0nzw=\r\n=Ui+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGC9hnGF6kbkNkRO7w2h9EztUkI5UF+kfhpEg7JONaEXAiEAq0qzFzaFi/giZaL3Q9nXCBn5ZA2ibmYPuYoJUjK6/iA="}]},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.2.0_1648152229490_0.35135028386252243"},"_hasShrinkwrap":false},"0.2.1":{"name":"@protoplasm/recall","version":"0.2.1","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^26.0.20","jest":"^27.3.1","prettier":"^2.2.1","ts-jest":"^27.0.7","typescript":"^4.1.3"},"gitHead":"97e07501244090185d70510d51cd1378477151d7","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.2.1","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-7OfrS55jRaF7uERewbjkO1kjDOaCZ+xTgI2NPko6ERFktqtGomUNab8GuQwzSyXcwyxwAuiuy1KpaNxfPujcqQ==","shasum":"8011416da4e975b4b79b35f60bc43c94a6e14617","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.2.1.tgz","fileCount":51,"unpackedSize":78825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPNdIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGjA//elNgRnO7vWUsO/SccPG4LWazaFUVJ+DfhaHPwOYpMWgLwO4r\r\nH8AUJZLs6wTUlvKI/HLMnzpK0kG6IO96rsZh1unlmPk7AmK08/fxTTXslKFN\r\n0hppXjlPQR7wQ/tBjTqUl8z/b3qi2Ju1fqYaQ8o4DDJB/Uc0WyInbAeHCsCF\r\n8mG8aBTe5CHc7dUvkZkrSW+AjeDiHNO9ugE55+DEOC0seNb9T3NaIUf9UlW7\r\nG8oPK05oHnk/XdG1PAGnjRcafWT9AEB9FU607gtZP0pwEBU4cDsbmUH10Mnw\r\nNkL8L1dNlOVu3OwZkQUSL+GmjK8uRACSyMLdQOrd8KK383h6mMdBztLhXMmY\r\nMKc4Dt+bB6ZnSi+2Cef0V5L1uR6M7PBPlabczsTcSff5iiZKg0ZjcTjlXpvl\r\nIkn2PSvKME9ReldA77jpxY9gEuMAZ5K2ea/tHky7/iYD107ELnv8oPf1NSEy\r\nYajUEHRai/3i0YWc84cbLr0XIIn5ZZyxoeBcqLyd5tmqIwbF08AqpV4VAoLW\r\nsVDsbp9wXI83he81FfQCjTFaYZjfRiE25zHUmCsUd1r7n57umZ9FHaQtYT/y\r\nG8ULshfAW+U20R8uPplGEBYnlR3VEXylhG69PbnvrTX5UDKdM0eBaox9637l\r\n0g372G4ZyNaepQPoUFhkkjhdYyRRbkt8unY=\r\n=uYse\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyhVfscKpR7Wv26CpIOkbqZM/Wm+oAytPEZ2gxinYJzAiEAqx77UKjKaYe3sfEoiiriFMVdTjv2zj06jb5gx+TcLWI="}]},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.2.1_1648154440100_0.9554464710309543"},"_hasShrinkwrap":false},"0.2.2":{"name":"@protoplasm/recall","version":"0.2.2","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^26.0.20","jest":"^27.3.1","prettier":"^2.2.1","ts-jest":"^27.0.7","typescript":"^4.1.3"},"gitHead":"2c26a0ffa6eba283c44222ce2d1fc1af1e6da98a","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.2.2","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-grQIYNd3UsFjHXL1g5Qw5MdUNAddEcD1KfqiO6WeMOQHgIgECXo7r4jfcXGIh37q17HoGQgq/G4guMGkzQ+UOA==","shasum":"4d8b259efba89938220088d444011b961ae3775a","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.2.2.tgz","fileCount":43,"unpackedSize":67189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQyQ0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoq1A//cK+cOw/8Pse3t/WHgKMdd358YKk2mFDMaLO/LOhjURUMXgTH\r\n5gdOq+DbWFg9c+b04F6ftrD8CFxinQbH+XDcoK7TXdrxs1rD/3Nhx6tXEFk5\r\nm+mFoRAQFNJLizF9OnqLeWcv3aET97e0ARaBTCqGk19E8VbRlfv9GUTHzZkQ\r\nxMzPlF0jeBKTm35Rcw+hoCN7fn0XQoGS1sc0gN4JSdJ+qemtdC+UkFdSfm5D\r\niMascc3tZEqlX1vt889BVJdaddlfzzjdGiInTKNlpciU9a/tnZm509fQIDNy\r\nOXf6dPQbw02lXdMqrojd20UXM6IcgVi3uVihv9x+Hz06YGXhKkyb7DASFrhb\r\nRmkPemezw4byf///ghaupC49DrASXF7cguHhbUwGfxfPAopW0RmHozKN2+qm\r\n1HiCp5f588gT4HXr2AejFRExYc4zu5vCoLyCDs4cjqaJlgL0/DO4ypoLo6u8\r\nm28OdEq033kqGxe44Lri99Cpq9WujHUX5eKsOzuv2xOts/wGtJsB9n80FeK8\r\nG6+EDnaI7m172JfIJ08Q6fj2jwE2bc6I/Shq6r1ii1hUMu5Fa9VdIya4Bsk1\r\nree507bhJWU7kE5uCLY+C+3FBBDYmpWjcRjyiELAQjabUvFm3R8Yjc2IDxiG\r\nnNCNBp1JlKygZ4NFTZ51p7UzfdUaDoexI3Y=\r\n=CFnB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBbFzOBNclOKKnFEDbSYXhg7/xf0ME402a9q8rE5dJURAiEA7s/SUZHd+0AdN1TAy5CeE3vGtEBtk5uXMeS/RSnsLJ8="}]},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.2.2_1648567348604_0.8897034377799546"},"_hasShrinkwrap":false},"0.2.3":{"name":"@protoplasm/recall","version":"0.2.3","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^27","jest":"^27","prettier":"^2.2.1","ts-jest":"^27","typescript":"^4.1.3"},"gitHead":"702b2e23b0e4632c37c9f4ec96411517890bf3a2","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.2.3","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-z3sFVCMK65MZyrSZH/mLhxlO9CxyR7NUUnktU/mkBvVoPi+nPXRgXGEVfSyV9U+C8ZzJAs++pC0nNRv8e+YXTg==","shasum":"43d315b6dd88c6c012cdc5cb5b2c57e9e4d46cbc","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.2.3.tgz","fileCount":43,"unpackedSize":67474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJpatBdW8AB/NbV+3otFiJugULKGl56O+S0rFa4sPkRAiBBKcni+5gLQHC7/I2Y0i9+waTxqf5mCi7medgGvLQ6vw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYdc9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeBA/+ILSnEhkPWJAIaJgYWyKpCrSVYvZnm7xc+O52TVNFaGf8/FKf\r\n+cEaHuHKuP2fEmWbJ/f6VCZJmy4vHAg8OAKa3vIkuzRrR6+9GAf/pg7G6fj1\r\nMy+p5QnUDaLPnqay9zBwKp+AWn4Bn12p/hJ0VU9eHpCvXjepUOT8Ojhs8OcV\r\n8Pp9J472fCPOBb3IXQZ6ZSESDD/37Kzur6yt0Gw/YTLWj9GwT8JZV1a8NS7U\r\n9o08ZOjNxjNnWGKyKZUn80+0D4DoPGwP64OC28qtDqNBZrfgjk2C4RL3y/hx\r\nKoVrKLBiOr0/FzBXZSg2EdPFe50WNTOYO5npR8EqI+/2RrtqEnC2I+grAMAm\r\nAb3mwEWTbczErP6RndLoHKPsQABH9WMraNvQvplqFs1M86HfGEu6A5CXBDbf\r\n/66PqpZ2CjMUlVBcomjMMXLlLZosfILIfTy76J1RZ/vBJNiDV82XPMM9iJmP\r\ngWE9wr36RorhaBEC5e6s7UfojuTt5bAs/IHiyRMQzGTSgxeOXZNUEjmTQb4i\r\nA+UiaUnLwxDM5Hhs2Stfb+t0ChWdkfn8p/R2qMan+YWNorbt+tR8gA4T9PFS\r\nP911M2FM3qvkNAztXBa13JF4lQlU9wTsaUHnJ/uR/y2KERVS15t9PLo2XpWu\r\n26nei7CVgL+A/JKZZUE7mS/h0gi4N3Qx7oU=\r\n=DZYz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.2.3_1650579261515_0.713675531058257"},"_hasShrinkwrap":false},"0.2.4":{"name":"@protoplasm/recall","version":"0.2.4","description":"lightweight memoization","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"scripts":{"build":"tsc -p .","watch":"tsc -p . -w","test":"jest","watch:test":"jest --watch","prepare":"npm run build"},"keywords":["memoization"],"author":{"name":"ash","email":"i@ashi.io"},"license":"MIT","engines":{"node":">=12.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^27","jest":"^27","prettier":"^2.2.1","ts-jest":"^27","typescript":"^4.1.3"},"gitHead":"f2b7aadf18f724149ef4ed808e5bf0ee73dfcff8","bugs":{"url":"https://github.com/queerviolet/recall/issues"},"homepage":"https://github.com/queerviolet/recall#readme","_id":"@protoplasm/recall@0.2.4","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-+w5WCHQwuZ0RZ3+ayJ42ArGPIeew2Wxb+g1rPNA+qiehCc4EDTDjW7DyPPq9FBa4lFUDC4mgDytV8Fkxe/Z3iQ==","shasum":"d7b1a5f1e94481d015e9666bd791e57d51b8cc67","tarball":"https://registry.npmjs.org/@protoplasm/recall/-/recall-0.2.4.tgz","fileCount":43,"unpackedSize":67436,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRbdU7AcPWvqNMi1AAgIrzKr4iPyGUYh0ad7q5iJyyHwIgLAN+fGn1Hj4iGomL33g84Fs0p0w0Ly2lnsao/mQ43/8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYdkPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOCg/8CMI0IKXzmzFNeKt0y9FMUMW1ml3nhrLosB8m3No8qOidhaNU\r\nMh6pAImJOGsL6AlW4VY5Jm2Y8WKh2LhRQhBYCK9KubFz9p4Tky8qC53FkAe7\r\nGijJASIPLBuknKp+pmumZfPqESNXPmrl84Jdy9YVu8jMbkcwQJXTyatoTzVF\r\nPAlTXP/LX7WfaasnSSwuUK6Fp9ZbE1gPcm82ICQlJOSTyyWD9n5Gq865BJj2\r\nGDaszzrbDlfeTfV+XNJ2CHtzAqdkaRP4Ae8FV3e7cOp/J0y2kqIBg7JhPR2y\r\nKUMf7WYFspGjSZQRHHIQb1NAAe7x5AuxaA2aboh/jeeZ7owSRx7nZmFdTNUh\r\nI1OLRYPhK1fsecdBFSoyd3IF1MlmZRbNiNEljbvVtPICir4gYRB5oL8PGETj\r\nqFO7DIWNMuSWuqHSroKy3zPCZ2zbYYJB3JVXtxNZAL0kJo7be9X3HeFZrulx\r\nclpSHKpndLvrkBQi6tKk8vH7TtdVCOlrN8pVseIYEbrF0JRaVUs5jsoj2oTm\r\nUAtTP7zNccycUcu686sxpQfiAKsb2it+Yvu7xixwV95P5cgGrudLLKBZ/1fQ\r\npASdpxR1tLNtJTT8GL3399XBwU0tFJVG/ZQaHZHtt+kSpeCtVtudpLYj6PGS\r\nseuZmtpuaBWH2gJClnBXHmhEq/ORsEvGV+U=\r\n=MHao\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"protoplasm","email":"protoplasm@ashi.io"},"directories":{},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recall_0.2.4_1650579727768_0.8210601001885816"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-25T07:55:07.764Z","0.1.0":"2022-01-25T07:55:07.946Z","modified":"2022-04-21T22:22:08.042Z","0.2.0":"2022-03-24T20:03:49.674Z","0.2.1":"2022-03-24T20:40:40.235Z","0.2.2":"2022-03-29T15:22:28.746Z","0.2.3":"2022-04-21T22:14:21.615Z","0.2.4":"2022-04-21T22:22:07.959Z"},"maintainers":[{"name":"protoplasm","email":"protoplasm@ashi.io"}],"description":"lightweight memoization","homepage":"https://github.com/queerviolet/recall#readme","keywords":["memoization"],"repository":{"type":"git","url":"git+https://github.com/queerviolet/recall.git"},"author":{"name":"ash","email":"i@ashi.io"},"bugs":{"url":"https://github.com/queerviolet/recall/issues"},"license":"MIT","readme":"# recall\n\n```\nnpm i @protoplasm/recall\n```\n\nthis package lets you memoize functions and generators.\n\nmain entry points:\n  - [`recall`](#recall-memoizes-functions) memoizes functions\n  - [`replay`](#replay-memoizes-generators) memoizes generators\n  - [`report`](#reporting-errors-and-other-things) reports non-fatal errors and messages which will also be memoized by `recall` and `replay`\n\n## `recall` memoizes functions\n\n`recall` takes a function and returns a memoized version:\n\n```typescript\nimport recall from '@protoplasm/recall'\n\nlet calls = 0;\nconst hi = recall((data?: any) => {\n  ++calls\n  return { hello: 'world', data }\n})\n\nexpect(hi()).toBe(hi())\nexpect(calls).toBe(1)\n\nexpect(hi(42)).toBe(hi(42))\nexpect(calls).toBe(2)\n```\n\n`recall`ed functions cache both normal and exceptional return paths. if the underlying function throws the first time it's called for a set of arguments, it will always throw the same error when invoked again.\n\narguments are shallowly compared by `===`. there is no way to change this.\n\n### *fn*.`getResult` returns the stored result\n\n`recall`ed functions also make `Result`s available via a `.getResult` method. `getResult` has the same signature as the underlying function, but returns `Result<T>` rather than `T`:\n\n```typescript\nconst evenSquare = recall((n: number) => {\n  if (n % 2 !== 0) throw new Error('odd numbers unsupported')\n  return n ** 2\n})\n\nevenSquare.getResult(2).isReturn() // -> true\nevenSquare.getResult(2).data       // -> 4\nevenSquare.getResult(2).unwrap()   // -> 4\n\nevenSquare.getResult(3).isReturn() // -> false\nevenSquare.getResult(3).isThrow()  // -> true\nevenSquare.getResult(3).error      // -> Error: odd numbers unsupported\nevenSquare.getResult(3).unwrap()   // !! throws Error: odd numbers unsupported\n```\n\n### *fn.*`getExisting` soft queries the cache\n\nthe `.getExisting` method works just like `.getResult`, only it will return `undefined` rather than calling the underlying if no entry for the arguments exists in the cache.\n\n\n## `replay` memoizes generators\n\nif you try to use `recall` on a generator, you're gonna have a bad time:\n\n```typescript\nconst gen = recall(function *() {\n  yield 1\n  yield 2\n  yield 3\n})\ngen() === gen() // -> true\n[...gen()]      // -> [1, 2, 3]\n[...gen()]      // -> []  (shit.)\n```\n\nthis happens because generators return iterators, which are consumed as you iterate over them.\n\n`replay` fixes this:\n\n```typescript\nconst gen = replay(function *() {\n  yield 1\n  yield 2\n  yield 3\n})\ngen() === gen() // -> true\n[...gen()]      // -> [1, 2, 3]\n[...gen()]      // -> [1, 2, 3]\n```\n\n`replay` wraps the generator in an `Iterable` which lazily stores each value the generator emits.\n\n## `report`ing errors\n\n`report` lets functions report messages independent of how they return. for example, you can `report` errors while still returning data:\n\n```typescript\nimport { report } from '@protoplasm/recall'\n\nfunction errorsAndData() {\n  report(new Error('something bad happened'))\n  report(new Error('something else bad happened'))\n  return \"but it's still ok\"\n}\n```\n\n`getResult` collects all messages `report`ed from a block. it returns these as part of a `Result`:\n\n```typescript\nimport { Result, getResult } from '@protoplasm/recall'\n\nconst result: Result<string> = getResult(() => errorsAndData())\nfor (const error of result.errors()) {\n  console.log(error) // -> 'something bad happened'\n                     // -> 'something else bad happened'\n}\nresult.unwrap()   // -> 'but it's still ok'\n```\n### `report`s bubble up\n\n`report` works no matter how deep you are in the call tree:\n\n```typescript\nfunction a() {\n  report(new Error(\"error from a\"))\n  b()\n}\n\nfunction b() {\n  report(new Error(\"error from b\"));\n  threeThingsFail();\n}\n\nfunction threeThingsFail() {\n  report(new Error(\"a\"));\n  report(new Error(\"b\"));\n  report(new Error(\"c\"));\n}\n\nconst result = getResult(() => {\n  a()\n  report(new Error('one last problem'))\n})\nresult.errors()\n  // -> error from a\n  // -> error from b\n  // -> a\n  // -> b\n  // -> c\n  // -> one last problem\n```\n\n## recipes\n\n### `recall` memoizes pure functions\n\nthe simplest case:\n\n```typescript\nconst sum = recall((ary: number[]) => ary.reduce((a, b) => a + b))\nconst a = [1, 2, 3, 4]\nsum(a)\nsum(a) // cache hit\n```\n\n### `recall` composite keys\n\nyou can use `recall` as a composite key map:\n\n```typescript\nconst song = recall((artist: string, title: string) => new Song(artist, title))\nconst coversOf = recall((song: Song) => [])\ncoversOf(song(\"Cher\", \"Believe\")).push(song(\"Okay Kaya\", \"Believe\"))\ncoversOf(song(\"Cher\", \"Believe\")).find(song(\"Okay Kaya\", \"Believe\"))\n```\n\n### `recall` a cache\n\nrecall can accept async functions. it simply caches the promise result:\n\n```typescript\nconst textOf = recall(async (url: string) => await (await fetch(url)).response.text)\nconst result = await textOf(\"https://...)\n```\n\n### `report` multiple errors while returning data\n\n```typescript\nconst doStuff = recall(things => {\n  let goodThings = []\n  for (const thing of things) {\n    if (isBad(thing)) {\n      report(new BadThingError(\"this thing is bad:\", thing))\n    } else {\n      goodThings.push(thing)   \n    }\n  }\n  if (!goodThings.length)\n    throw new Error(\"no good things\")\n  return processKnownGoodThings(goodThings)\n})\n\nconst output = doStuff\n  .getResult(someThings)\n  // prints non-fatal errors to console.log and unwraps:\n  .unwrap(console.log)\n```\n\n### `report` errors while yielding data\n\n```typescript\nconst processedThings = replay(function *(things) {\n  for (const thing of things) {\n    if (isBad(thing)) {\n      report(new BadThingError(\"this thing is bad:\", thing))\n    } else {\n      yield processGoodThing(thing)\n      goodThings.push(thing)   \n    }\n  }\n})\n\nconst output = getResult(() =>\n    // iterate over all processedThings to collect\n    // errors on all of them    \n    [...processedThings(someThings)]\n  ).unwrap(console.log)\n```\n\n\n### using `getResult` as a reporting boundary\n\n`getResult` and *fn.*`getResult` do not bubble `report`s up, so you can use them as error boundaries:\n\n```typescript\nfunction importantStuff() {\n  report(new Error('error in importantStuff'))\n}\n\nfunction optionalSetup() {\n  report(new Error('error in optionalStuff'))\n}\n\ngetResult(() => {\n  importantStuff()\n  optionalStuff()\n}).errors()\n  // -> [Error: error in importantStuff]\n  // -> [Error: error in optionalStuff]\n\ngetResult(() => {\n  importantStuff()\n  getResult(() => optionalStuff())\n    // swallowing the result swallows the error\n}).errors()\n  // -> [Error: error in importantStuff]\n```\n#### manually bubbling\n\nyou can `report(someResult.log)` to explicitly bubble up messages from `someResult`.\n\nthis is useful if you want to use `getResult` (for example, to inspect the errors) but still want bubbling to happen:\n\n```typescript\ngetResult(() => {\n  importantStuff()\n  const result = getResult(() => optionalStuff())\n  for (const error in result.errors()) doSomethingElseWith(error)  \n  report(result.log)\n}).errors()\n  // -> [Error: error in importantStuff]\n  // -> [Error: error in optionalStuff]\n```","readmeFilename":"README.md"}