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

@dotlottie/dotlottie-js

Package Overview
Dependencies
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotlottie/dotlottie-js - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

16

dist/node/dotlottie.js

@@ -14,3 +14,3 @@ import { strToU8, zip, unzip, strFromU8 } from 'fflate';

name: "@dotlottie/dotlottie-js",
version: "0.3.1",
version: "0.3.2",
type: "module",

@@ -1188,5 +1188,4 @@ description: "This library helps in creating and modifying .lottie files.",

const buffer = await this.toArrayBuffer();
let ret = Buffer.from(buffer).toString();
ret = `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${ret}`;
return ret;
const base64 = Buffer.from(buffer).toString("base64");
return `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${base64}`;
}

@@ -1377,2 +1376,3 @@ };

for (const key of Object.keys(contentObj)) {
const decompressedFile = contentObj[key];
const decodedStr = strFromU8(contentObj[key], false);

@@ -1398,8 +1398,8 @@ if (key.startsWith("animations/") && key.endsWith(".json")) {

}
let decodedImg = Buffer.from(decodedStr).toString("base64");
const ext = getExtensionTypeFromBase64(decodedImg);
decodedImg = `data:image/${ext};base64,${decodedImg}`;
const base64 = Buffer.from(decompressedFile).toString("base64");
const ext = getExtensionTypeFromBase64(base64);
const imgDataURL = `data:image/${ext};base64,${base64}`;
tmpImages.push(new LottieImage2({
id: imageId,
data: decodedImg,
data: imgDataURL,
fileName: key.split("/")[1] || ""

@@ -1406,0 +1406,0 @@ }));

@@ -14,3 +14,3 @@ import { strToU8, zip, unzip, strFromU8 } from 'fflate';

name: "@dotlottie/dotlottie-js",
version: "0.3.1",
version: "0.3.2",
type: "module",

@@ -1195,5 +1195,4 @@ description: "This library helps in creating and modifying .lottie files.",

const buffer = await this.toArrayBuffer();
let ret = Buffer.from(buffer).toString();
ret = `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${ret}`;
return ret;
const base64 = Buffer.from(buffer).toString("base64");
return `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${base64}`;
}

@@ -1384,2 +1383,3 @@ };

for (const key of Object.keys(contentObj)) {
const decompressedFile = contentObj[key];
const decodedStr = strFromU8(contentObj[key], false);

@@ -1405,8 +1405,8 @@ if (key.startsWith("animations/") && key.endsWith(".json")) {

}
let decodedImg = Buffer.from(decodedStr).toString("base64");
const ext = getExtensionTypeFromBase64(decodedImg);
decodedImg = `data:image/${ext};base64,${decodedImg}`;
const base64 = Buffer.from(decompressedFile).toString("base64");
const ext = getExtensionTypeFromBase64(base64);
const imgDataURL = `data:image/${ext};base64,${base64}`;
tmpImages.push(new LottieImage2({
id: imageId,
data: decodedImg,
data: imgDataURL,
fileName: key.split("/")[1] || ""

@@ -1413,0 +1413,0 @@ }));

@@ -436,5 +436,4 @@ var __defProp = Object.defineProperty;

const buffer = await this.toArrayBuffer();
let ret = Buffer.from(buffer).toString();
ret = `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${ret}`;
return ret;
const base64 = Buffer.from(buffer).toString("base64");
return `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${base64}`;
}

@@ -441,0 +440,0 @@ };

@@ -162,5 +162,4 @@ var __defProp = Object.defineProperty;

const buffer = await this.toArrayBuffer();
let ret = Buffer.from(buffer).toString();
ret = `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${ret}`;
return ret;
const base64 = Buffer.from(buffer).toString("base64");
return `data:image/${this.fileName.split(".")[1] || "jpeg"};base64,${base64}`;
}

@@ -167,0 +166,0 @@ };

{
"name": "@dotlottie/dotlottie-js",
"version": "0.3.1",
"version": "0.3.2",
"type": "module",

@@ -5,0 +5,0 @@ "description": "This library helps in creating and modifying .lottie files.",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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