New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

htmltobase64

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

htmltobase64 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "htmltobase64",
"version": "1.0.0",
"version": "1.0.1",
"description": "turns an html webpage into a base64 encoded image",

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

@@ -7,18 +7,19 @@ # HtmlToBase64

const htmlToBase64 = require("html2base64")
let width = 1280;
let height = 1080;
let replacements = {
user: "dwiftejb"
} // replace anything that has {{key}} to value
let selector = "body"; // selects the element to screenshot and save as base64, leave empty to screenshot whole page.
```js
const htmlToBase64 = require("htmltobase64")
let width = 1280;
let height = 1080;
async function main() {
const base64 = await htmlToBase64("<h1>hello {{user}}</h1>", width, height, replacements, selector);
console.log(base64);
}
let replacements = {
user: "dwiftejb"
} // replace anything that has {{key}} to value
main();
let selector = "body"; // selects the element to screenshot and save as base64, leave empty to screenshot whole page.
async function main() {
const base64 = await htmlToBase64("<h1>hello {{user}}</h1>", width, height, replacements, selector);
console.log(base64);
}
main();
```
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