Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@ampproject/toolbox-cache-list
Advanced tools
Lists known AMP Caches, as available at https://cdn.ampproject.org/caches.json
.
By default, it uses a one-behind caching strategy to fetch the caches. This can be customised by passing a custom fetch strategy to the constructor.
Install via:
$ npm install @ampproject/toolbox-cache-list@beta
List all known caches:
const Caches = require('@ampproject/toolbox-cache-list');
const allCaches = await Caches.list();
Which will return:
[
{
"id": "google",
"name": "Google AMP Cache",
"docs": "https://developers.google.com/amp/cache/",
"cacheDomain": "cdn.ampproject.org",
"updateCacheApiDomainSuffix": "cdn.ampproject.org",
"thirdPartyFrameDomainSuffix": "ampproject.net"
},
{
"id": "cloudflare",
"name": "Cloudflare AMP Cache",
"docs": "https://amp.cloudflare.com/",
"cacheDomain": "amp.cloudflare.com",
"updateCacheApiDomainSuffix": "amp.cloudflare.com",
"thirdPartyFrameDomainSuffix": "cloudflareamp.net"
},
{
"id": "bing",
"name": "Bing AMP Cache",
"docs": "https://www.bing.com/webmaster/help/bing-amp-cache-bc1c884c",
"cacheDomain": "bing-amp.com",
"updateCacheApiDomainSuffix": "bing-amp.com",
"thirdPartyFrameDomainSuffix": "bing-amp.net"
}
]
Fetching info about a specific AMP cache via the cache id:
const Caches = require('@ampproject/toolbox-cache-list');
const googleAmpCache = await Caches.get('google');
Which will return:
{
"id": "google",
"name": "Google AMP Cache",
"docs": "https://developers.google.com/amp/cache/",
"cacheDomain": "cdn.ampproject.org",
"updateCacheApiDomainSuffix": "cdn.ampproject.org",
"thirdPartyFrameDomainSuffix": "ampproject.net"
}
FAQs
Lists AMP Caches
The npm package @ampproject/toolbox-cache-list receives a total of 229 weekly downloads. As such, @ampproject/toolbox-cache-list popularity was classified as not popular.
We found that @ampproject/toolbox-cache-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.