Socket
Socket
Sign inDemoInstall

@bradymholt/ampify

Package Overview
Dependencies
20
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

10

index.js

@@ -133,5 +133,9 @@ const fs = require("fs");

if (src.indexOf("//") === -1) {
const image = `${options.cwd}/${$(element).attr("src")}`;
if (fs.existsSync(image)) {
const size = sizeOf(image);
let imagePath = `${options.cwd}/${$(element).attr("src")}`;
if (imagePath.includes("#")) {
// Remove hash fragment from src
imagePath = imagePath.split("#")[0];
}
if (fs.existsSync(imagePath)) {
const size = sizeOf(imagePath);
$(element).attr({

@@ -138,0 +142,0 @@ width: round(size.width),

{
"name": "@bradymholt/ampify",
"version": "1.0.0",
"version": "1.1.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

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

# ampify
# ampify [![NPM Package](https://img.shields.io/npm/v/@bradymholt/ampify.svg)](https://www.npmjs.com/package/@bradymholt/ampify)

@@ -3,0 +3,0 @@ > Convert plain HTML to Google AMP (Accelerated Mobile Pages)

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