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.
proto-arrows
Advanced tools
proto-arrows
A set of utility functions for drawing beautiful arrows using cubic bezier paths. Inspired by perfect-arrows
.
Why proto-arrows
? Because cubic bezier curves look delicious for prototyping software like Sketch or Figma. So, why not make a library that simplifies the process of drawing them too?
import React from 'react'
import {
getCurve,
interpolateCubicBezierAngle,
getCubicBezierSVGPath,
} from 'proto-arrows'
export function Arrow() {
const curve = getCurve({ x: 128, y: 128 }, { x: 256, y: 256 })
const svgPath = getCubicBezierSVGPath(bezierCurve)
const endAngle = interpolateCubicBezierAngle(bezierCurve, 1)
return (
<svg
viewBox="0 0 512 512"
style={{ width: 512, height: 512 }}
stroke="#000"
fill="#000"
strokeWidth={3}
>
<circle cx={curve.start.x} cy={curve.start.y} r={4} />
<path d={svgPath} fill="none" />
<polygon
points="0,-6 12,0, 0,6"
transform={`translate(${curve.end.x},${curve.end.y}) rotate(${endAngle})`}
/>
</svg>
)
}
Steve Ruiz - (steveruizok) for building the perfect-arrows
(MIT) library, which inspired this library.
Peter Beshai - (pbeshai) for building vis-utils
(MIT), from which I borrowed the interpolation functions for cubic bezier paths.
FAQs
Utility functions for drawing beautiful arrows using cubic bezier paths
The npm package proto-arrows receives a total of 15 weekly downloads. As such, proto-arrows popularity was classified as not popular.
We found that proto-arrows 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.