{"id":18062889,"url":"https://github.com/stagas/memoize-pure","last_synced_at":"2025-10-18T13:25:01.712Z","repository":{"id":57294483,"uuid":"434471304","full_name":"stagas/memoize-pure","owner":"stagas","description":"low footprint memoize for just pure sync functions with scalar arguments","archived":false,"fork":false,"pushed_at":"2021-12-03T06:11:56.000Z","size":206,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-10T07:13:00.490Z","etag":null,"topics":["memoize"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stagas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-03T04:58:08.000Z","updated_at":"2021-12-04T13:12:59.000Z","dependencies_parsed_at":"2022-08-29T07:51:59.196Z","dependency_job_id":null,"html_url":"https://github.com/stagas/memoize-pure","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"stagas/ts","purl":"pkg:github/stagas/memoize-pure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fmemoize-pure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fmemoize-pure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fmemoize-pure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fmemoize-pure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stagas","download_url":"https://codeload.github.com/stagas/memoize-pure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fmemoize-pure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267606293,"owners_count":24114707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["memoize"],"created_at":"2024-10-31T05:08:47.675Z","updated_at":"2025-10-18T13:25:01.635Z","avatar_url":"https://github.com/stagas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ememoize-pure\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nlow footprint memoize for just pure sync functions with scalar arguments\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"#install\"\u003e        🔧 \u003cstrong\u003eInstall\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#example\"\u003e        🧩 \u003cstrong\u003eExample\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#api\"\u003e            📜 \u003cstrong\u003eAPI docs\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/memoize-pure/releases\"\u003e 🔥 \u003cstrong\u003eReleases\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#contribute\"\u003e     💪🏼 \u003cstrong\u003eContribute\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/memoize-pure/issues\"\u003e   🖐️ \u003cstrong\u003eHelp\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n***\n\n## Install\n\n```sh\n$ npm i memoize-pure\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n*   [memoize](#memoize)\n    *   [Parameters](#parameters)\n*   [memoizeDebug](#memoizedebug)\n    *   [Parameters](#parameters-1)\n\n### memoize\n\n[src/index.ts:16-26](https://github.com/stagas/memoize-pure/blob/b06373fb2b76ba49c486d0189e8c4a31d728276d/src/index.ts#L16-L26 \"Source code on GitHub\")\n\nMemoize a function.\n\n```ts\nconst fn = memoize((a, b, c) =\u003e some_expensive_calls(a, b, c))\n...\nconst result = fn(1, 2, 3) // =\u003e calls the inner function and saves arguments signature \"1,2,3\"\n...\nconst result = fn(1, 2, 3) // =\u003e returns the memoized result immediately since \"1,2,3\" matches memory\n```\n\n#### Parameters\n\n*   `fn` **any** The function to memoize\n*   `map`  A map object to use as memory\u0026#x20;(optional, default `Object.create(null)`)\n\nReturns **any** The memoized function\n\n### memoizeDebug\n\n[src/index.ts:48-89](https://github.com/stagas/memoize-pure/blob/b06373fb2b76ba49c486d0189e8c4a31d728276d/src/index.ts#L48-L89 \"Source code on GitHub\")\n\nDebug memoize a function.\n\n```ts\nconst fn = memoizeDebug((a, b, c) =\u003e some_expensive_calls(a, b, c))\n...\nconst result = fn(1, 2, 3) // =\u003e calls the inner function and saves arguments signature \"1,2,3\"\n...\nconst result = fn(1, 2, 3) // =\u003e returns the memoized result immediately since \"1,2,3\" matches memory\nfn.__memoizeTimesCalled__ // =\u003e 1\nfn.__memoizeMap__ // =\u003e { '1,2,3': 'some result' }\n```\n\n#### Parameters\n\n*   `fn` **any** The function to memoize\n*   `map`  \u0026#x20;(optional, default `Object.create(null)`)\n*   `threshold`  \u0026#x20;(optional, default `Infinity`)\n\nReturns **any** The memoized function including two properties:*   `__memoizeMap__` is the memory map of arguments and results\n*   `__memoizeTimesCalled__` is the count that the wrapped function has been called\n\n## Contribute\n\n[Fork](https://github.com/stagas/memoize-pure/fork) or\n[edit](https://github.dev/stagas/memoize-pure) and submit a PR.\n\nAll contributions are welcome!\n\n## License\n\nMIT © 2021\n[stagas](https://github.com/stagas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fmemoize-pure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstagas%2Fmemoize-pure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fmemoize-pure/lists"}