Socket
Socket
Sign inDemoInstall

amp-site-validator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-site-validator - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

15

index.js

@@ -1,11 +0,14 @@

const pool = require('async-functions-pool')();
const createPool = require('async-functions-pool');
const amphtmlValidator = require('amphtml-validator');
const fetch = require('node-fetch');
module.exports = async (urlGenerator, parallel = 1) => {
const validator = await amphtmlValidator.getInstance();
for(url of urlGenerator()){
pool.add(makeJob(validator, url));
module.exports = () => {
const pool = createPool();
return async (urlGenerator, parallel = 1) => {
const validator = await amphtmlValidator.getInstance();
for(url of urlGenerator()){
pool.add(makeJob(validator, url));
}
return pool.run(parallel);
}
return pool.run(parallel);
}

@@ -12,0 +15,0 @@

2

package.json
{
"name": "amp-site-validator",
"version": "2.0.1",
"version": "3.0.0",
"description": "Full site AMP Pages validator",

@@ -5,0 +5,0 @@ "main": "index.js",

![Current Version](https://img.shields.io/npm/v/amp-site-validator.svg)
![NPM Minified size](https://img.shields.io/bundlephobia/min/amp-site-validator.svg)
![Github Code Size](https://img.shields.io/github/languages/code-size/wjsc/amp-site-validator.svg)
![Downloads/Week](https://img.shields.io/npm/dw/amp-site-validator.svg)
![Downloads/Year](https://img.shields.io/npm/dy/amp-site-validator.svg)
![Issues](https://img.shields.io/github/issues/wjsc/amp-site-validator.svg)

@@ -11,3 +11,4 @@ ![License](https://img.shields.io/github/license/wjsc/amp-site-validator.svg)

# amp-site-validator | Full site AMP Pages validator
# amp-site-validator
### Full site AMP validator

@@ -18,4 +19,5 @@ If you publish your pages in AMP, you want to be sure any change does not affect your AMP performance. How? Setup a function generator that returns all URLS you want to validate and test them with the official Google's validator.

```
// 1. Import module
const validator = require('amp-site-validator');
// 1. Import module and create a Validator
const createValidator = require('amp-site-validator');
const validator = createValidator();

@@ -22,0 +24,0 @@ // 2. Create your own url generator

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc