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

btrz-pdf

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btrz-pdf - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

2

package.json
{
"name": "btrz-pdf",
"version": "1.12.0",
"version": "1.13.0",
"description": "Generates pdf documents based on a liquid template",

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

@@ -87,5 +87,10 @@ const {Liquid} = require("liquidjs");

// console.log(str);
return JSON.parse(str);
try {
return JSON.parse(str);
} catch (err) {
err.data = str;
throw err;
}
},
defaultDocumentDefinition
};

@@ -321,2 +321,20 @@ describe("index.js", () => {

it("should return the error JSON in the err.data property", async () => {
const pdf = require("../src/index");
const template = `{
"content": [{},
]
}`;
try {
const documentDefinition = await pdf.toDocumentDefinition(template, data);
expect(1).to.be.eql(2);
} catch (err) {
//spaces are important in this test
expect(err.data).to.be.eql(`{
"content": [{},
]
}`);
}
});
it("should parse dates from ISO dates", async () => {

@@ -323,0 +341,0 @@ const pdf = require("../src/index");

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