GitShow/sindresorhus/memoize
sindresorhus

memoize

Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input

by sindresorhus
Star on GitHubForknpm

TypeScript

1.2k stars54 forks18 contributorsQuiet · 3mo agoSince 2015v11.0.0MIT

Meet the team

See all 18 on GitHub →
sindresorhus
sindresorhus61 contributions
fregante
fregante22 contributions
SamVerschueren
SamVerschueren5 contributions
Richienb
Richienb3 contributions
BendingBender
BendingBender2 contributions
bencehornak
bencehornak1 contribution
coreyfarrell
coreyfarrell1 contribution
dylang
dylang1 contribution

Languages

View on GitHub →
TypeScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 1 discussion · Last activity 3mo ago
See all on GitHub →
fregante
Warn when `cacheKey` is unset and `function.length > 1`?OpenIssue

By default, only the memoized function's first argument is considered via strict equality comparison I think should call in this case: Correct usage:

fregante · 2mo ago

Recent fixes

View closed PRs →
fregante
Don't add parameters after functions ClosedIssue

While this reads fine: This is bad practice: This could be enforced by a linter, since APIs like exist natively, but ideally and should accept a single parameter: It complicates types a bit but it requires the much cleaner: _Personal note:_ I went through this recently in webext-storage-cache, changing to

fregante · 3mo ago
Copilot
Export CacheItem and CacheLike types for TypeScript custom cache definitionsMergedPR

TypeScript users need to manually copy internal type definitions to create custom caches because and are not exported. Changes index.ts: Export and types test-d/index.test-d.ts: Add type tests verifying exported types work with custom cache implementations Usage Original prompt This section details on the original issue you should resolve* Defining custom cache in TypeScript Neither , nor are exported. So, in order to define a custom cache, I have to manually copy the types: or, a bit nicer: Could we have some exported types? ## Comments on the Issue (you are @copilot in this section) Fixes sindresorhus/memoize#111 💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot · 3mo ago
Richienb
Defining custom cache in TypeScriptClosedIssue

Neither , nor are exported. So, in order to define a custom cache, I have to manually copy the types: or, a bit nicer: Could we have some exported types?

Richienb · 3mo ago
Structured data for AI agents

Repository: sindresorhus/memoize. Description: Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input Stars: 1160, Forks: 54. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Latest release: v11.0.0 (3mo ago). Open PRs: 0, open issues: 1. Last activity: 3mo ago. Community health: 85%. Top contributors: sindresorhus, fregante, SamVerschueren, Richienb, BendingBender, bencehornak, coreyfarrell, dylang, elvinn, keithamus and others.

·@ofershap

Replace github.com with gitshow.dev