Last 12 weeks · 0 commits
2 of 6 standards met
Repository: developit/decko. Description: :dash: The 3 most useful ES7 decorators: bind, debounce and memoize Stars: 1038, Forks: 34. Primary language: JavaScript. Languages: JavaScript (96.2%), TypeScript (3.8%). License: MIT. Homepage: https://developit.github.io/decko/ Topics: debounce, decorators, memoization, memoize, throttle-calls. Latest release: 1.2.0 (9y ago). Open PRs: 1, open issues: 5. Last activity: 7y ago. Community health: 42%. Top contributors: developit, Hotell, bryanjenningz, DanielRuf, cronon, dalaidunc.
JavaScript
This snippet demonstrates that the decorator does not work correctly on second method call if that method invokes super method which in turn is also decorated: Output:
A short term solution. Long term I'd prefer to see a real debounce included, since I use that way more often personally.
The current implementation of memoize doesn't work correctly with non-primitive function parameters. E.g. look at this test: Do you think it would make sense to print a corresponding error message when they try to pass any non-primitive ref as a parameter? could be a solution for this problem (for memory leak also). cc @stryju