Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
squaresplit
Advanced tools
A tiny JavaScript library for splitting a single square container into multiple squares. which is useful for generating CSS sprites and WebGL textures. This library was inspired by mapbox/potpack
import squaresplit from 'squaresplit';
const numberOfSquares = 50
const size = 1024 // optional
const {squares fill} = potpack(numberOfSquares,size);
// squares is resulting squares with format {w: number, h: number, x: number, y: number}
// fill is the space utilization value (0 to 1), higher is better
//squares are ordered from biggest width to least
squares[0]; // {w: 300, h: 300, x: 0, y: 0}
squares[1]; // {w: 100, h: 100, x: 100, y: 0}
Install with NPM: npm install squaresplit
.
In Node, you can't use require
— only import
in ESM-capable versions (v12.15+):
import squaresplit from 'squaresplit';
FAQs
A tiny library for spitting a square into smaller squares
The npm package squaresplit receives a total of 0 weekly downloads. As such, squaresplit popularity was classified as not popular.
We found that squaresplit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.