Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Uri.js | 6,143 | 50,695 | 1,016 | a year ago | 28 | April 03, 2022 | 62 | mit | JavaScript | |
Javascript URL mutation library | ||||||||||
Better Dateinput Polyfill | 259 | 5 | 2 | 2 years ago | 29 | April 17, 2021 | 8 | mit | JavaScript | |
input[type=date] polyfill for better-dom | ||||||||||
Ember Cached Decorator Polyfill | 19 | 8 months ago | 12 | mit | TypeScript | |||||
Polyfill for RFC 566: @cached | ||||||||||
Ember In Element Polyfill | 17 | a year ago | 15 | mit | JavaScript | |||||
Polyfill for `in-element` as per RFC 287 | ||||||||||
Url | 16 | 4 months ago | 2 | mpl-2.0 | PHP | |||||
Makes the algorithms and APIs defined by URL Standard (replaces RFC 3986 and RFC 3987) available on PHP. / URL Standard (RFC 3986、RFC 3987 を置き換える Web 標準仕様) で定義されているアルゴリズム、および API を PHP から利用できるようにします。 | ||||||||||
Yay Enums | 7 | 7 years ago | mit | PHP | ||||||
Enumerated Types polyfill for PHP | ||||||||||
Web Monetization Polyfill | 6 | 4 years ago | JavaScript | |||||||
Polyfill for web monetization that requires no extension | ||||||||||
Ember Destroyable Polyfill | 5 | 2 years ago | 17 | mit | JavaScript | |||||
Polyfill for RFC 580: Destroyables | ||||||||||
Rfc Encode Uri | 2 | 7 years ago | isc | JavaScript | ||||||
RFC3986 Compliant encodeURI/encodeURIComponent polyfill for Node.js | ||||||||||
Babel Plugin Ember Data Packages Polyfill | 2 | 3 years ago | mit | JavaScript | ||||||
Polyfill for EmberData Package Imports (RFC 395) |
Polyfill for RFC 566 "@cached decorator".
ember 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.
import { tracked, cached } from '@glimmer/tracking';
class Person {
@tracked firstName = 'Jen';
@tracked lastName = 'Weber';
@cached
get fullName() {
return `${this.firstName} ${this.lastName}`;
}
}
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
):
import '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"
]
}