
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Make CSS Polygon Shape
$ npm install figur
# or
$ yarn add figur
import {poly, star} from "figur";
import { CLASS_NAME, STROKE_LINEJOIN } from "./consts";
export interface Shape {
left?: number;
top?: number;
right?: number;
bottom?: number;
width?: number;
heigh?t: number;
fill?: string;
strokeLinejoin?: STROKE_LINEJOIN;
strokeWidth?: number;
className?: string;
origin?: string | number;
[key: string]: any;
}
export interface RoundRectShape extends Shape {
round?: number;
css?: boolean;
}
export interface PolyShape extends Shape {
side?: number;
split?: number;
css?: boolean;
innerRadius?: number;
}
export interface OvalShape extends Shape {
r?: number;
rx?: number;
ry?: number;
}
export function getPath(points: number[][]): string; // path('M 0 0 L 0 0 Z');
export function be(path: SVGPathElement, options: PolyShape, container?: SVGElement): void;
export function star(options: PolyShape, container?: SVGElement): SVGElement;
export function poly(options: PolyShape, container?: SVGElement): SVGElement;
export function oval(options: OvalShape, container?: SVGElement): SVGElement;
export function rect(options: RoundRectShape, container?: SVGElement): SVGElement;
<script src="//daybrush.com/figur/release/latest/dist/shape.js"></script>
<script src="//daybrush.com/figur/release/latest/dist/shape.min.js"></script>
import {poly, star, be} from "figur";
// 10 star
// Shape.poly
const el = poly({width: 100, side: 10, strokeWidth: 5, fill: "transparent", strokeLinejoin: "round"});
// Shape.star
const el = star({width: 100, css: true, side: 10, innerRadius: 30, strokeWidth: 5, strokeLinejoin: "bavel"});
document.body.appendChild(el);
// Shape.be
// 10 star => 5 polygon (split 4)
be(el, {width: 100, side: 5, css: true, split: 4, innerRadius: 30, strokeWidth: 5, strokeLinejoin: "bavel"});
use be function with {css: true} or change d path syle.
but side X split must be the same to be animated. (star(inner-radius) is split twice)
FAQs
Make svg polygon & star shape
We found that figur 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.