Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
amphtml-validator-extra
Advanced tools
Enhanced package of amphtml-validator.
It is possible to designate multiple URLs and file paths and verify them all together.
const amphtmlValidator = require('amphtml-validator');
const urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls).then((result) => {
console.log(result);
});
// [
// status: 'PASS'
// errors: [...]
// ],
// [
// status: 'FAIL',
// errors: [...]
// ],
// ...
amphtmlValidator.validateHtml('<html amp>...</html>').then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
html | string | AMP HTML sourde |
let urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls).then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
urls | array or string | AMP Page URL. |
option.auth.user | string | Basic auth user name. |
option.auth.password | string | Basic auth password. |
option.progress | function | Progress callback function. |
let urls = [
'./test/article-01.html',
'./test/article-02.html',
'./test/article-03.html'
];
amphtmlValidator.validateFile(urls).then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
urls | array or string | AMP Page URL. |
option.progress | function | Progress callback function. |
Progress callback function.
let urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
let option = {
progress: (progress) => {
console.log(`${progress.index} / ${progress.max}`);
}
};
amphtmlValidator.validateUrl(urls, option).then((result) => {
console.log(result);
});
/*
* 1 / 3
* 2 / 3
* 3 / 3
*/
let urls = [
'https://example.com/auth/article-01.html?amp',
'https://example.com/auth/article-02.html?amp',
'https://example.com/auth/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls, {
auth: {
user: 'username',
password: 'password'
}
}).then((result) => {
console.log(result);
});
FAQs
Enhanced package of amphtml-validator.
The npm package amphtml-validator-extra receives a total of 7 weekly downloads. As such, amphtml-validator-extra popularity was classified as not popular.
We found that amphtml-validator-extra 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's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.