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

polotno-node

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polotno-node - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

7

index.js

@@ -22,3 +22,10 @@ const puppeteer = require('puppeteer');

},
jsonToDataURL: async (json) => {
return await instance.run(async (json) => {
store.loadJSON(json);
await store.waitLoading();
return store.toDataURL();
}, json);
},
};
};

2

package.json
{
"name": "polotno-node",
"version": "0.1.1",
"version": "0.1.2",
"description": "Polotno workflow from NodeJS",

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

@@ -13,7 +13,12 @@ # Polotno-node

const fs = require('fs');
const { createInstance } = require('./index');
const { createInstance } = require('polotno-node');
async function run() {
// create working instance
const instance = await createInstance({ key: 'nFA5H9elEytDyPyvKL7T' });
const instance = await createInstance({
// this is a demo key just for that project
// (!) please don't use it in your projects
// to create your own API key please go here: https://polotno.dev/cabinet
key: 'nFA5H9elEytDyPyvKL7T',
});

@@ -31,2 +36,4 @@ // load sample json

}, json);
// or the same code, but much shorter:
// const url = await instance.jsonToDataURL(json);

@@ -44,2 +51,3 @@ // prepare base64 string to save

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