Socket
Socket
Sign inDemoInstall

friendly-amp-validator

Package Overview
Dependencies
14
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    friendly-amp-validator

Quick URL and HTML AMP Validator


Version published
Weekly downloads
14
Maintainers
1
Install size
2.49 MB
Created
Weekly downloads
 

Readme

Source

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();

Keywords

FAQs

Last updated on 10 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc