Gathering detailed insights and metrics for amphtml-validator-extra
Gathering detailed insights and metrics for amphtml-validator-extra
Gathering detailed insights and metrics for amphtml-validator-extra
Gathering detailed insights and metrics for amphtml-validator-extra
npm install amphtml-validator-extra
Typescript
Module System
Node Version
NPM Version
Total Downloads
2,390
Last Day
1
Last Week
12
Last Month
53
Last Year
663
Minified
Minified + Gzipped
Latest Version
0.1.6
Package Id
amphtml-validator-extra@0.1.6
Unpacked Size
14.03 kB
Size
4.47 kB
File Count
6
NPM Version
6.9.0
Node Version
10.15.1
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-7.7%
12
Compared to previous week
Last Month
-39.8%
53
Compared to previous month
Last Year
114.6%
663
Compared to previous year
3
1
Enhanced package of amphtml-validator.
It is possible to designate multiple URLs and file paths and verify them all together.
1const amphtmlValidator = require('amphtml-validator-extra'); 2const urls = [ 3 'https://example.com/article-01.html?amp', 4 'https://example.com/article-02.html?amp', 5 'https://example.com/article-03.html?amp' 6]; 7 8amphtmlValidator.validateUrl(urls).then((result) => { 9 console.log(result); 10}); 11// [ 12// status: 'PASS' 13// errors: [...] 14// ], 15// [ 16// status: 'FAIL', 17// errors: [...] 18// ], 19// ...
1amphtmlValidator.validateHtml('<html amp>...</html>').then((result) => { 2 console.log(result); 3});
Argment | Type | Description |
---|---|---|
html | string | AMP HTML sourde |
1let urls = [ 2 'https://example.com/article-01.html?amp', 3 'https://example.com/article-02.html?amp', 4 'https://example.com/article-03.html?amp' 5]; 6 7amphtmlValidator.validateUrl(urls).then((result) => { 8 console.log(result); 9});
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. |
1let urls = [ 2 './test/article-01.html', 3 './test/article-02.html', 4 './test/article-03.html' 5]; 6 7amphtmlValidator.validateFile(urls).then((result) => { 8 console.log(result); 9});
Argment | Type | Description |
---|---|---|
urls | array or string | AMP Page URL. |
option.progress | function | Progress callback function. |
Progress callback function.
1let urls = [ 2 'https://example.com/article-01.html?amp', 3 'https://example.com/article-02.html?amp', 4 'https://example.com/article-03.html?amp' 5]; 6let option = { 7 progress: (progress) => { 8 console.log(`${progress.index} / ${progress.max}`); 9 } 10}; 11 12amphtmlValidator.validateUrl(urls, option).then((result) => { 13 console.log(result); 14}); 15/* 16 * 1 / 3 17 * 2 / 3 18 * 3 / 3 19 */
1let urls = [ 2 'https://example.com/auth/article-01.html?amp', 3 'https://example.com/auth/article-02.html?amp', 4 'https://example.com/auth/article-03.html?amp' 5]; 6 7amphtmlValidator.validateUrl(urls, { 8 auth: { 9 user: 'username', 10 password: 'password' 11 } 12}).then((result) => { 13 console.log(result); 14});
No vulnerabilities found.
No security vulnerabilities found.