
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
@ganlanyuan/w3cjs
Advanced tools
A node.js library for testing files or url's against the w3c html validator.
npm install w3cjs
var w3cjs = require('w3cjs');
var results = w3cjs.validate({
file: 'demo.html', // file can either be a local file or a remote file
//file: 'http://html5boilerplate.com/',
//input: '<html>...</html>',
//input: myBuffer,
output: 'json', // Defaults to 'json', other option includes html
//proxy: 'http://proxy:8080', // Default to null
callback: function (err, res) {
console.log(res);
// depending on the output type, res will either be a json object or a html string
}
});
var w3cjs = require('w3cjs');
describe('html validation', function(){
it('index page should have no html errors', function(done){
w3cjs.validate({
file: 'index.html',
callback: function (error, res) {
console.log(error || res);
if (res && res.messages.length > 0 ) {
throw {error: 'html errors have been found', results: res};
};
done();
}
})
})
})
w3c has changed their validator API to not include some old options. It will eventually be fully deprecated and everyone is advised to update to 0.3.0 of this module.
doctype: 'HTML5', // Defaults false for autodetect
charset: 'utf-8', // Defaults false for autodetect
FAQs
A node.js module for using the w3c validator.
The npm package @ganlanyuan/w3cjs receives a total of 0 weekly downloads. As such, @ganlanyuan/w3cjs popularity was classified as not popular.
We found that @ganlanyuan/w3cjs 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
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.