
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ebay-predict
Advanced tools
ebay-predict
is a simple tag to prefetch static assets from a prediction service. A prediction service is a server endpoint, that responds with the suggested JSON schema (see below). If the service is not hosted on the same origin as the page, please ensure proper CORS support is enabled. <ebay-predict>
triggers the prefetch only after the page load
event and use the requestIdleCallback
API, to ensure the current page is rendered without any interferance. If requestIdleCallback
API is not available, then the provided delay is used.
npm install ebay-predict --save
browser.json
"ebay-predict/browser.json"
<ebay-predict>
. This can be embeded in the <footer>
tag of page HTML<html>
...
<footer>
<ebay-predict src="https://www.ebay.com/sch/predict" delay="200" limit="2"/>
</footer>
</html>
<ebay-predict>
AttributesName | Type | Stateful | Description |
---|---|---|---|
src | String | No | prediction service endpoint (mandatory) |
delay | String | No | Only used when requestIdleCallback API is not available. A delay in milliseconds for the prefetch to trgger, after the page load event (default: "200" ) |
limit | String | No | a limit on the number of resources (for each type) to be prefetched. Use caution when prefetching more than 2 resources, as that may contend with current page bandwidth (default: "2" ) |
Prediction service JSON schema and sample response
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"css": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"js": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"media": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
}
}
}
{
"css": ["https://ir.ebaystatic.com/rs/c/br/inception-PMg1-OXo.css", "https://ir.ebaystatic.com/rs/c/br/highlnfe-BTZUdVe3.css"],
"js": ["https://ir.ebaystatic.com/rs/c/br/inception-dnRHPO-V.js", "https://ir.ebaystatic.com/rs/c/br/highlnfe-AK2d_fr4.js"],
"media": ["https://i.ebayimg.com/00/s/MzZYNDI=/z/BGEAAOSw8FRZqY4x/$_57.PNG", "https://i.ebayimg.com/images/g/aYoAAOSwl89cAW9D/s-l500.webp"]
}
Have a bug or a feature request? Please open a new issue
Pull Requests welcome. Please submit Github issues for any feature enhancements, bugs or documentation problems.
Copyright (c) 2018 eBay Inc.
Released under the MIT License
FAQs
A component to prefetch static assets from a prediction service
The npm package ebay-predict receives a total of 0 weekly downloads. As such, ebay-predict popularity was classified as not popular.
We found that ebay-predict 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.