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.
csscomb-core
Advanced tools
CSScomb Core is a framework for writing postprocessors.
It provides you with a nice set of features:
var Comb = require('csscomb-core');
// Constructor accepts a list of options to use and list of acceptable syntaxes.
var comb = new Comb(options, 'css');
For a simple example of usage take a look
at a template project.
Feel free to fork it and modify.
There are a number of methods that become available once you create an instance.
Use a plugin.
Load configuration from JSON.
Activate and configure needed options.
Get list of available options in exact order they will be processed.
Can be used for testing purpose.
Get option's value.
Can be used inside plugin's process
method.
Get name of syntax that is currently being used.
Can be used inside plugin's process
method.
Lint a file or a directory.
Lint all files in a directory.
Lint a single file.
Lint a string.
css
being a default value.Process a file or a directory.
Process all files in a directory.
Process a single file.
Process a string.
css
being a default value.A plugin is a JavaScript object that has methods to set value and process AST
nodes.
Take a look at Flip Comb for an example.
There are some fields you should take care of.
Option's name as it should be used in config.
"flip-comments"
List of syntaxes the option supports.
This depends on parser possibilities.
Currently the following work fine: css
, less
, sass
and scss
.
['css']
In order to tell CSScomb Core which values are acceptable, plugin should have
either accepts
or setValue
field.
accepts
should be used to provide patterns, while setValue
is good for
modifying value before using it.
You can use one or several of the following:
– boolean: [true]
– boolean: [false]
– boolean: [true, false]
– string: /regexp/
– number: true
setValue
must be set{ boolean: [true] }
Function to modify option's value before using it.
This field overrides accepts
field if it's set in the plugin too.
accepts
must be set function(value) { return value * 4; }
Run the plugin before another option.
"block-indent"
Modify AST nodes.
function(nodeType, nodeContent) {
if (nodeType === 'commentML') node[0] = ' (╯°□°)╯︵ ┻━┻ ';
}
FAQs
Framework for writing postprocessors
The npm package csscomb-core receives a total of 4,149 weekly downloads. As such, csscomb-core popularity was classified as popular.
We found that csscomb-core 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.