Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html2amp

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html2amp - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

lib/toolbox.js

5

index.js

@@ -0,1 +1,2 @@

const cheerio = require('cheerio')

@@ -14,2 +15,3 @@ const amp = require('./lib/amp')

const link = require('./lib/link')
const toolbox = require('./lib/toolbox')

@@ -30,5 +32,6 @@ const html2amp = async (html, options = {}) => {

$ = boilerplate($, options)
return $.html()
html = await toolbox.optimizer($.html(), options)
return html
}
module.exports = html2amp

3

package.json
{
"name": "html2amp",
"version": "1.1.0",
"version": "1.2.0",
"description": "Simple converter from HTML into AMP(Accelerated Mobile Pages)",

@@ -28,2 +28,3 @@ "main": "index.js",

"dependencies": {
"@ampproject/toolbox-optimizer": "^1.1.2-alpha.0",
"axios": "^0.19.0",

@@ -30,0 +31,0 @@ "cheerio": "^1.0.0-rc.2",

@@ -52,4 +52,4 @@

serviceWorker| |attributes of [amp-install-serviceworker](https://www.ampproject.org/docs/reference/components/amp-install-serviceworker) <br/> e.g. `src`, `data-iframe-src`
optimize|false| if true, this module will optimize the html by using [@ampproject/toolbox-optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer)
## Functions

@@ -80,2 +80,3 @@

- e.g. `<a href="/test">` is replaced with `<a href="https//original-url.com/test">`
- optimize html by using [@ampproject/toolbox-optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer)

@@ -82,0 +83,0 @@ ## Preparation

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