![Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts](https://cdn.sanity.io/images/cgdhsj6q/production/1ba0de113c804fecef80d5f68add3d625becba39-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
easing-coordinates
Advanced tools
Utility script that takes an easing function as input and outputs a coordinate set with adjustable precision/resolution.
Utility to turn steps and cubic-bezier single-transition-timing-functions into an array of "low-poly" xy-coordinates.
import { easingCoordinates } from 'easing-coordinates'
easingCoordinates('cubic-bezier(0.5, 0, 0.5, 1)')
/* =>
[
{ x: 0, y: 0 },
{ x: 0.136, y: 0.028 },
{ x: 0.248, y: 0.104 },
{ x: 0.342, y: 0.216 },
{ x: 0.424, y: 0.352 },
{ x: 0.5, y: 0.5 },
{ x: 0.576, y: 0.648 },
{ x: 0.658, y: 0.784 },
{ x: 0.752, y: 0.896 },
{ x: 0.864, y: 0.972 },
{ x: 1, y: 1 },
]
*/
easingCoordinates('steps(4)')
/* =>
[
{ x: 0, y: 0 },
{ x: 0.25, y: 0 },
{ x: 0.25, y: 0.25 },
{ x: 0.5, y: 0.25 },
{ x: 0.5, y: 0.5 },
{ x: 0.75, y: 0.5 },
{ x: 0.75, y: 0.75 },
{ x: 1, y: 0.75 },
]
*/
Use stepsCoordinates
and cubicCoordinates
methods directly depending on your
data:
import { cubicCoordinates, easingCoordinates, stepsCoordinates } from 'easing-coordinates'
cubicCoordinates(0.42, 0, 1, 1) === easingCoordinates('cubic-bezier(0.42, 0, 1, 1)')
stepsCoordinates(4, 'skip-end') === easingCoordinates('steps(4, skip-end)')
Increase polySteps (default = 10, min = 2) to get a "higer-poly" version of your cubic-bezier functions.
interface ICoordinate {
x: number
y: number
}
function easingCoordinates(easingFunction: string, polySteps?: number): ICoordinate[]
function stepsCoordinates(steps: number, skip = 'skip-end'): ICoordinate[]
function cubicCoordinates(
x1: number,
y1: number,
x2: number,
y2: number,
polySteps = 10
): ICoordinate[]
(See package.json for more scripts)
# Checkout and then
npm install
# Compile and watch the .ts files
npm run watch
# Run test
npm run test
FAQs
Utility script that takes an easing function as input and outputs a coordinate set with adjustable precision/resolution.
The npm package easing-coordinates receives a total of 4,117 weekly downloads. As such, easing-coordinates popularity was classified as popular.
We found that easing-coordinates 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.