Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Turns a mess of font sizes into a nice consistent scale.
Pass in an array of your current font sizes, and some options to generate a modular scale.
var consonance = require('consonance');
var input = [10, 15, 17, 22, 23, 24, 34, 37, 47, 50, 68, 74];
var options = {
base: 16,
ratios: [3/2, 4/3],
length: 8
}
consonance(input, options);
Alternatively, provide own typographic scale as an array of pixel sizes.
var consonance = require('consonance');
var input = [10, 15, 17, 22, 23, 24, 34, 37, 47, 50, 68, 74];
var scale = [10, 16, 24, 36, 48, 72];
consonance(input, scale);
Consonance returns an array of objects containing the "input" and what we transformed it to. WIP - data structure might change before 1.0.0.
[ { "input": 10, "output": 10, "i": 0 },
{ "input": 15, "output": 16, "i": 1 },
{ "input": 17, "output": 16, "i": 2 },
{ "input": 22, "output": 24, "i": 3 },
{ "input": 23, "output": 24, "i": 4 },
{ "input": 24, "output": 24, "i": 5 },
{ "input": 34, "output": 36, "i": 6 },
{ "input": 37, "output": 36, "i": 7 },
{ "input": 47, "output": 48, "i": 8 },
{ "input": 50, "output": 48, "i": 9 },
{ "input": 68, "output": 72, "i": 10 },
{ "input": 74, "output": 72, "i": 11 } ]
FAQs
Fix your typographic scale
The npm package consonance receives a total of 0 weekly downloads. As such, consonance popularity was classified as not popular.
We found that consonance 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.