
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
A simple tool for combing HTML attributes.
dist/
├── htmlcomb.js (8 KB)
└── htmlcomb.min.js (4 KB)
Three quick start options are available:
git clone https://github.com/fengyuanchen/htmlcomb.git.npm install htmlcomb.<script src="/path/to/htmlcomb.js"></script>
var htmlcomb = new HTMLComb(options);
htmlcomb.format(source, function (result) {
console.log(result);
});
var fs = require("fs");
var HTMLComb = require("htmlcomb");
var htmlcomb = new HTMLComb(options);
fs.readFile("/path/to/source.html", function(err, data) {
if (err) {
throw err;
}
fs.writeFile("/path/to/result.html", htmlcomb.format(data.toString()), function (err) {
if (err) {
throw err;
}
console.log("Done, without errors.");
});
});
BooleantrueFor example:
<!-- Source -->
<div id=main></div>
<!-- Result -->
<div id="main"></div>
BooleantrueFor example:
<!-- Source -->
<div id='main'></div>
<!-- Result -->
<div id="main"></div>
BooleantrueFor example:
<!-- Source -->
<div class=" " id=""></div>
<!-- Result -->
<div class id></div>
BooleantrueAlso removes the indentation after the newline.
For example:
<!-- Source -->
<div data-search="{
'url': 'https://github.com/search',
'q': 'htmlcomb'
}"></div>
<!-- Result -->
<div data-search="{ 'url': 'https://github.com/search', 'q': 'htmlcomb'}"></div>
BooleantrueFor example:
<!-- Source -->
<div class="foo bar baz"></div>
<!-- Result -->
<div class="foo bar baz"></div>
Array[
"class",
"id",
"name",
"data",
"src",
"for",
"type",
"href",
"value",
"title",
"alt",
"role",
"aria"
]
The default order references to the Code Guide's attribute order.
For example:
<!-- Source -->
<input required class="input-email" type="email" id="inputEmail" name="email">
<!-- Result -->
<input class="input-email" id="inputEmail" name="email" type="email" required>
| Parameters | Type | Description |
|---|---|---|
| options | Object | Custom options |
Change the default options.
| Parameters | Type | Description |
|---|---|---|
| source | String | The source text for combing |
| options (optional) | Object | Change the default options temporarily |
| callback (optional) | Function | e.g: function (result) {} |
Format source HTML attributes.
Maintained under the Semantic Versioning guidelines.
FAQs
A simple tool for combing HTML attributes.
The npm package htmlcomb receives a total of 197 weekly downloads. As such, htmlcomb popularity was classified as not popular.
We found that htmlcomb 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.