{"id":23035797,"url":"https://github.com/blackchef/shallowmemoize","last_synced_at":"2025-08-14T17:31:34.941Z","repository":{"id":51855397,"uuid":"94419309","full_name":"blackChef/shallowMemoize","owner":"blackChef","description":"Shallow compare function arguments for memoization.","archived":false,"fork":false,"pushed_at":"2024-02-28T09:44:02.000Z","size":42,"stargazers_count":2,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-07T03:39:07.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/blackChef.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":"2017-06-15T08:43:46.000Z","updated_at":"2024-02-28T09:45:29.000Z","dependencies_parsed_at":"2023-01-23T09:15:08.826Z","dependency_job_id":null,"html_url":"https://github.com/blackChef/shallowMemoize","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackChef%2FshallowMemoize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackChef%2FshallowMemoize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackChef%2FshallowMemoize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackChef%2FshallowMemoize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackChef","download_url":"https://codeload.github.com/blackChef/shallowMemoize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229847826,"owners_count":18133644,"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","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":[],"created_at":"2024-12-15T16:47:04.353Z","updated_at":"2024-12-15T16:47:04.905Z","avatar_url":"https://github.com/blackChef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShallowMemoize\nMemoization with ability to set cache size and use shallow comparison.\n\n# Usage\n```js\nimport memoize from 'shallow-memoize'\n\nlet memoizeOptions = {\n  cacheSize: 1, // size of cache, should be greater than 0. Default is Infinity.\n  useShallowCompare: true, // whether shallow compare should be used. Default is false.\n};\n\nlet add = memoize(function(a, b) {\n  return a.val + b.val;\n}, memoizeOptions);\n\nadd({ val: 5 }, { val: 5 });\nadd({ val: 5 }, { val: 5 }); // cache hit\n\nadd({ val: 3 }, { val: 3 });\nadd({ val: 3 }, { val: 3 }); // cache hit\n\nadd({ val: 5 }, { val: 5 }); // no cache, because cache size is 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackchef%2Fshallowmemoize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackchef%2Fshallowmemoize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackchef%2Fshallowmemoize/lists"}