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

@mamodesaebsaad/image-to-base64

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mamodesaebsaad/image-to-base64 - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

9

lib/index.js

@@ -16,7 +16,4 @@ /**

}
else if (file.type === "gif") {
base64String = base64String.replace("data:image/gif;base64,", "");
}
else {
base64String = base64String.replace(/^data:image\/(png|jpg|jpeg|webp);base64,/, "");
base64String = base64String.replace(/^data:image\/(png|jpg|jpeg|webp|gif);base64,/, "");
}

@@ -39,3 +36,2 @@ resolve(base64String);

let svgfileType = "data:image/svg+xml;base64,";
let gifFileType = "data:image/gif;base64,";
let image = "";

@@ -45,5 +41,2 @@ if (file === "svg") {

}
else if (file === "gif") {
image = gifFileType + base64String;
}
else {

@@ -50,0 +43,0 @@ image = imageFiletype + base64String;

2

package.json
{
"name": "@mamodesaebsaad/image-to-base64",
"version": "1.0.2",
"version": "1.0.3",
"description": "Conversion of image to base64 and vice-versa",

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

@@ -17,7 +17,4 @@

}
else if (file.type === "gif"){
base64String = base64String.replace("data:image/gif;base64,", "");
}
else {
base64String = base64String.replace(/^data:image\/(png|jpg|jpeg|webp);base64,/, "");
base64String = base64String.replace(/^data:image\/(png|jpg|jpeg|webp|gif);base64,/, "");
}

@@ -42,3 +39,2 @@ resolve(base64String);

let svgfileType = "data:image/svg+xml;base64,";
let gifFileType = "data:image/gif;base64,";
let image = "";

@@ -48,5 +44,2 @@ if(file === "svg"){

}
else if(file === "gif"){
image = gifFileType + base64String;
}
else{

@@ -53,0 +46,0 @@ image = imageFiletype + base64String;

Sorry, the diff of this file is not supported yet

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