
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.
Helpers for sharing style tokens between (S)CSS and JS.
Useful for:
Requirements:
This package won't do the heavy lifting of configuring your bundler to output CSS modules. Rather, it provides a few helpers for streamlining the whole import/export business.
npm install icss-js
Use ICSS export statements:
:export {
transitionDuration: 500;
mainColor: purple;
}
ICSS exports are flat by nature. Exporting complex SASS data structures like
lists and maps requires an intermediate step. We'll use the icss-export
function to convert those to JSON that can later be parsed by the JS helpers.
@import "icss-js/src/icss-export.scss";
$breakpoints: (small: 420px, medium: 768px, large: 1024px);
:export {
breakpoints: icss-export($breakpoints);
}
Import your stylesheet as a CSS module, then pass the exports into the provided helper function to receive a valid JS object.
import parseIcssExports from 'icss-js'
import cssExports from './styles/main.scss'
const {
breakpoints,
transitionDuration
} = parseIcssExports(cssExports)
console.log(breakpoints) // { "small": 420, "medium": 768 }
console.log(transitionDuration) // 500
MIT License © Philipp Daun
FAQs
Share style tokens between (S)CSS and JS
We found that icss-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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.