Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
primrose-tween
Advanced tools
A tiny (~4KB) and versatile tweening library for JavaScript/TypeScript. This library was built to be usable both with Node and for web-based applications.
To quickly begin using Primrose for web-based applications, clone this repository and add the primrose.min.js
file to your project. To access the API, simply add the script to the required HTML file.
<script type="text/javascript" src="path/to/primrose.min.js"></script>
Otherwise Primrose can be installed via NPM:
npm install --save primrose-tween
And included in a project as needed:
import { Primrose } from 'primrose-tween'; // TypeScript
const { Primrose } = require('primrose-tween'); // JavaScript
Below is the current functionality for Primrose tweening. Only the from
and to
options are required. All instance methods return a reference to the instance so they can be chained from creation. The auto
factory is highly useful for generating auto-playing tweens, as well as the promisified create
and auto
methods.
import { Primrose } from 'primrose-tween';
const options = {
from: { alpha: 0 }, // Initial Values (must be an object reference of numerics) [REQUIRED]
to: { alpha: 1 }, // Final Values (same as `from`) [REQUIRED]
duration: 2000, // Animation Duration (defaulted to 2000ms)
onUpdate: (val) => {}, // User specified update method where `val` is the current tween values
onComplete: () => {} // Callback after tween completion.
};
const instance = Primrose.start(opts); // Tween instance creator.
const autoInst = Primrose.auto(opts); // Pre-started instance.
instance.start(); // Starts the tween if not already started
instance.pause(); // Pauses the tween.
instance.reset(); // Resets the tween to its beginning.
Primrose is licensed under the MIT license.
FAQs
Small Tweening Library.
We found that primrose-tween 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.