Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
async-preloader
Advanced tools
Assets preloader using ES2017 async/await and fetch.
$ npm install --save async-preloader
import AsyncPreloader from "async-preloader";
const pItems = AsyncPreloader.loadItems([
{ src: "/static/default" }, // A file without extension or loader specified uses `Response.text()`
{ id: "myTextFile", src: "/static/text.txt" },
{ id: "myJsonFile", src: "/static/json.json" },
{ id: "myImageFile", src: "/static/image.jpg" },
{ id: "myVideoFile", src: "/static/video.mp4" },
{ id: "myAudioFile", src: "/static/audio.mp3" },
{ id: "myXmlFile", src: "/static/xml.xml" },
{ id: "mySvgFile", src: "/static/xml.svg" },
{ id: "myHtmlFile", src: "/static/xml.html" },
{ loader: "Font", src: "Open Sans" } // src is the font name here https://github.com/bramstein/fontfaceobserver
]);
pItems
.then(items => {
console.log("All items loaded", items);
const element = AsyncPreloader.items.get("myVideoFile");
document.body.appendChild(element);
})
.catch(error => console.error("Error loading items", error));
MIT © Damien Seguin
FAQs
Assets preloader using async/await and fetch for usage both in the browser and Node.js.
The npm package async-preloader receives a total of 0 weekly downloads. As such, async-preloader popularity was classified as not popular.
We found that async-preloader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.