
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
sass-map-magic
Advanced tools
A sass utility library for handling map values. The functions here take maps as one or more of their arguments and return new modified map values.
Included are five functions corresponding to five numeric operators: add()
, subtract()
, mutiply()
, divide()
and modulo()
. The first two arguments can be map values or single values. All except modulo()
accept a 3rd boolean argument to toggle the return value as a css calc()
string rather than the result of sass arithmetic. (CSS calc does not support modulo).
If using two map values, both must have identical key values.
@use "~sass-map-magic" as magic;
$map: (
"phone": 10px,
"tablet": 20px,
"desktop": 30px
);
$newMap = magic.multiply($map, 2);
//result
$newMap: (
"phone": 20px,
"tablet": 40px,
"desktop": 60px
);
@use "~sass-map-magic" as magic;
$map: (
"phone": 10px,
"tablet": 20px,
"desktop": 30px
);
$modifier: (
"phone": 1vw,
"tablet": 2vw,
"desktop": 3vw
);
$newMap = magic.add($map, $modifier, true);
//result
$newMap: (
"phone": calc(10px + 1vw),
"tablet": calc(20px + 2vw),
"desktop": calc(30px + 3vw)
);
Slice can be used to return a segment of an existing map, taking the start and end key as arguments
@use "~sass-map-magic" as magic;
$map: (
"phone": 10px,
"large-phone": 15px,
"tablet": 20px,
"desktop": 30px,
"desktop-large": 40px
);
$newMap = magic.slice($map, 'large-phone', 'desktop');
//result
$newMap: (
"large-phone": 15px,
"tablet": 20px,
"desktop": 30px
);
FAQs
Handy sass functions for working with map values
The npm package sass-map-magic receives a total of 0 weekly downloads. As such, sass-map-magic popularity was classified as not popular.
We found that sass-map-magic 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.