friendly-amp-validator
v1.0.11
Published
Quick URL and HTML AMP Validator
Downloads
42
Maintainers
Readme
Easy AMP Validator
Friendly and pretty AMP Validator for URLs and HTML
Installation
Using npm:
$ npm i -g npm
$ npm i --save friendly-amp-validator
Usage
Validate AMP by URL
In Node.js:
await validateUrl('URL-you-want-to-validate');
Validate AMP by HTML
In Node.js:
await validateHtml('Raw-HTML');
Examples
Validate AMP by URL
In Node.js:
// Load the validateUrl build
const { validateUrl } = require("friendly-amp-validator")
// Use Validation
async function validate() {
console.log(await validateUrl('URL-you-want-to-validate'))
}
// Run
validate();
Validate AMP by HTML
In Node.js:
// Load the validateUrl build
const { validateHtml } = require("friendly-amp-validator")
// Use Validation
async function validate() {
console.log(await validateHtml('HTML-you-want-to-validate'))
}
// Run
validate();