
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
A small ECMAScript parser, tokenizer and minifier written in JavaScript.
<script src="chiffon.js"></script>
or
<script src="chiffon.min.js"></script>
Object Chiffon will defined in the global scope.
npm install chiffon
var Chiffon = require('chiffon');
bower install chiffon
Parse a string source.
The result will be an abstract syntax tree (JavaScript AST) object.
(JavaScript AST is specified by the ESTree spec.)
Example:
var ast = Chiffon.parse('1 + 1');
console.log(ast);
/*
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "BinaryExpression",
"operator": "+",
"left": {
"type": "Literal",
"value": 1,
"raw": "1"
},
"right": {
"type": "Literal",
"value": 1,
"raw": "1"
}
}
}
]
}
*/
range : {boolean} default=false
Include an index-based location range. (array)
loc : {boolean} default=false
Include line number and column-based location info.
Full options are following.
var options = {
range: Boolean,
loc: Boolean
};
Tokenize a string source.
var tokens = Chiffon.tokenize('var a = 1');
console.log(tokens);
/*
[ { type: 'Keyword', value: 'var' },
{ type: 'Identifier', value: 'a' },
{ type: 'Punctuator', value: '=' },
{ type: 'Numeric', value: '1' } ]
*/
comment : {boolean} default=false
Keep comment tokens.
whiteSpace : {boolean} default=false
Keep white space tokens.
lineTerminator : {boolean} default=false
Keep line terminator tokens.
range : {boolean} default=false
Include an index-based location range. (array)
loc : {boolean} default=false
Include line number and column-based location info.
Full options are following.
var options = {
comment: Boolean,
whiteSpace: Boolean,
lineTerminator: Boolean,
range: Boolean,
loc: Boolean
};
Concatenate to string from the parsed tokens.
Tokens can return to the original string by using the untokenize with these options.
var source = 'var a = 1, b = 2; // comment';
var tokens = Chiffon.tokenize(source, {
comment: true,
whiteSpace: true,
lineTerminator: true
});
var result = Chiffon.untokenize(tokens, { unsafe: true });
console.log(result === source); // true
Minify JavaScript source.
var min = Chiffon.minify('var a = 1 + 1; // comment');
console.log(min); // 'var a=1+1;'
MIT
FAQs
A small ECMAScript parser, tokenizer and minifier written in JavaScript.
The npm package chiffon receives a total of 40 weekly downloads. As such, chiffon popularity was classified as not popular.
We found that chiffon 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.