Gathering detailed insights and metrics for ember-cached-decorator-polyfill
Gathering detailed insights and metrics for ember-cached-decorator-polyfill
Gathering detailed insights and metrics for ember-cached-decorator-polyfill
Gathering detailed insights and metrics for ember-cached-decorator-polyfill
npm install ember-cached-decorator-polyfill
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (54.66%)
JavaScript (37.64%)
HTML (7.41%)
Handlebars (0.3%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
20 Stars
86 Commits
6 Forks
1 Watchers
9 Branches
13 Contributors
Updated on May 30, 2024
Latest Version
1.0.2
Package Id
ember-cached-decorator-polyfill@1.0.2
Unpacked Size
29.21 kB
Size
9.31 kB
File Count
16
NPM Version
8.15.0
Node Version
16.17.0
Published on
Jul 26, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
1
48
Polyfill for RFC 566 "@cached decorator".
1ember install ember-cached-decorator-polyfill
For addons, pass the -S
flag.
If you're working in an environment with an explicit Babel config (like a V2
addon or an app with ember-cli-babel
's { useBabelConfig: true }
mode), see "Explicit Babel Config" below.
Add a @cached
decorator for memoizing the result of a getter based on
autotracking. In the following example, fullName
would only recalculate if
firstName
or lastName
is updated.
1import { tracked, cached } from '@glimmer/tracking'; 2 3class Person { 4 @tracked firstName = 'Jen'; 5 @tracked lastName = 'Weber'; 6 7 @cached 8 get fullName() { 9 return `${this.firstName} ${this.lastName}`; 10 } 11}
For detailed usage instructions, refer to the RFC 566 "@cached decorator".
TypeScript's normal type resolution for an import from @glimmer/tracking
will not find the types provided by this polyfill, since the actual
@glimmer/tracking
package does not include an export for cache
.
In order for TypeScript to recognize the extra cache
export, add an import
like this somewhere in your codebase (like app.ts
or test-helper.ts
):
1import 'ember-cached-decorator-polyfill';
Once the upstream types have been updated to reflect RFC 566, this will no longer be necessary.
In environments where you have an explicit Babel config (like authoring a V2
addon) you will need to configure this polyfill's babel plugin. Add it to your
babel.config.js
like:
{
"plugins": [
"ember-cached-decorator-polyfill/babel-plugin"
]
}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 5/17 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
64 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More