
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
A tiny requestAnimationFrame wrapper to improve usability. - Demo
$ npm install --save stepperjs
import Stepper from 'stepperjs';
import linear from 'stepperjs/dist/easings/linear';
const stepper = new Stepper({
duration: 300, // default: 0
easing: linear, // default: linear
loop: true, // default: false
reverse: true // default: false
}).on({
start() { ... },
update(n) { ... },
paused() { ... },
ended() { ... },
stopped() { ... }
});
stepper.start();
If you want to change options after creating the object
const stepper = new Stepper();
stepper.option('duration', 500);
stepper.option('easing', linear);
stepper.option('loop', false);
stepper.option('reverse', false);
// or
stepper.option({
duration: 500,
easing: linear,
loop: false,
reverse: false
});
If you want to use multiple easing function.
import Stepper from 'stepperjs';
import linear from 'stepperjs/dist/easings/linear';
import inBack from 'stepperjs/dist/easings/inBack';
const stepper = new Stepper({
duration: 300,
easing: [linear, inBack]
}).on({
update: (n1, n2) => {
console.log(n1); // value of linear
console.log(n2); // value of inBack
}
});
stepper.start();
<script type="text/javascript" src="stepperjs.browser-0.2.1.min.js"></script>
var Stepper = stepperjs.Stepper();
var easings = stepperjs.easings;
var stepper = new Stepper({
duration: 300,
easing: easings.linear,
loop: true,
reverse: true
}).on({
start: function () { ... },
update: function (n) { ... },
paused: function () { ... },
ended: function () { ... },
stopped: function () { ... }
});
stepper.start();
MIT
FAQs
A tiny requestAnimationFrame wrapper to improve usability.
We found that stepperjs 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.