Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
postcss-external-vars
Advanced tools
Readme
PostCSS plugin for injecting external variables to your CSS.
/* Input example */
.foo {
color: $color.primary;
}
/* Output example */
.foo {
color: #bada55;
}
$ npm install postcss-external-vars
const externalVars = require('postcss-external-vars');
const data = {
color: {
primary: '#bada55',
background: '#1337af'
}
};
const css = '.foo {color: $color.primary}';
// Use stand-alone:
const result = externalVars.process(css, {data}).css;
//=> '.foo {color: #bada55}'
// Or as PostCSS plugin:
const postcss = require('postcss');
const result = postcss([externalVars({data})]).process(css).css;
//=> '.foo {color: #bada55}'
Check PostCSS docs out for examples in your preferred environment.
Type: object
Required
An object
of properties to be used within your CSS.
Type: string
Default: $
A prefix for variable names. May contain several characters.
Returns a function
that will accept string
to check if it contains any variables and return boolean
. Useful to filter your css declarations before processing.
Options are the same.
Returns a function
that will accept string
and return an array
of all the matched variable names within it.
Options are the same.
MIT © Dmitriy Sobolev
FAQs
PostCSS plugin for injecting external variables to your CSS
We found that postcss-external-vars 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.