
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
memoize-decorator
Advanced tools
This is a method/getter decorator which is when applied to a method or a getter memoizes the result of the first call and returns it on subsequent calls.
As decorators are a part of future ES7 standard they can only be used with transpilers such as Babel.
Installation:
% npm install memoize-decorator
Example:
import memoize from 'memoize-decorator'
class Component {
@memoize
get expensiveValue() {
console.log('heavy computations')
return 42
}
}
let component = new Component()
component.expensiveValue // prints 'heavy computations', returns 42
component.expensiveValue // just returns 42
FAQs
Memoize getters and methods to compute only once
The npm package memoize-decorator receives a total of 12,572 weekly downloads. As such, memoize-decorator popularity was classified as popular.
We found that memoize-decorator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.