Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@sil/animationframe
Advanced tools
Use the animation frame with a single function, don't think about all the prefixes and ways to do it, this Vue mixin makes it's workable with only one function.
You can use this as simple as an Interval with a timeout, but it won't block or fill your browser up. It uses the animationframe to determine if a function can be called.
npm install @sil/animationframe
import animationFrame from '@sil/animationframe';
animationFrame(()=>{
// Your animation
console.log('hoi!');
},3000);
The function accepts also an extra argument 'max' which can be set to do a certain function only a set amount of times.
Set the argument after the time, this is the max amount of times. In the example below, the console.log will be fired 100 times with an interval of 3 seconds.
animationFrame(()=>{
// Your animation
console.log('hoi!');
},3000,100);
This function can be easily used as a Vue mixin.
In Nuxt
Create a file for your mixins, in the plugins folder. Add this to your nuxt.config.js
nuxt.config:
plugins: [{ src: '~plugins/global.mixins.js' , ssr: true }]
global.mixins.js
import Vue from 'vue';
import animationFrame from '@sil/animationframe';
Vue.mixin({
methods: {
animationFrame: animationFrame;
}
});
FAQs
Simple animationframe function
The npm package @sil/animationframe receives a total of 0 weekly downloads. As such, @sil/animationframe popularity was classified as not popular.
We found that @sil/animationframe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.