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

idea-html2pdf

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-html2pdf - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

dist/html2pdf.d.ts
/// <reference types="node" />
import { Lambda } from 'aws-sdk';
import { SafeString } from 'handlebars';
import { S3 } from 'idea-aws';

@@ -23,2 +24,10 @@ import { Languages, SignedURL } from 'idea-toolbox';

/**
* Compile an Handlebars template.
*/
handlebarsCompile(input: any, options?: CompileOptions): HandlebarsTemplateDelegate;
/**
* Return a new safe string for Handlebars templates.
*/
handlebarsSafeString(str: string): SafeString;
/**
* Create a new PDF created by an HTML source.

@@ -25,0 +34,0 @@ * @param params the parameters to create the PDF

16

dist/index.js

@@ -38,2 +38,14 @@ (function webpackUniversalModuleDefinition(root, factory) {

/**
* Compile an Handlebars template.
*/
handlebarsCompile(input, options) {
return handlebars_1.compile(input, options);
}
/**
* Return a new safe string for Handlebars templates.
*/
handlebarsSafeString(str) {
return new handlebars_1.SafeString(str);
}
/**
* Create a new PDF created by an HTML source.

@@ -97,3 +109,3 @@ * @param params the parameters to create the PDF

const variables = { _template, _data };
return new handlebars_1.default.SafeString(handlebars_1.default.compile(htmlInnerTemplate, { compat: true })(variables));
return new handlebars_1.SafeString(handlebars_1.compile(htmlInnerTemplate, { compat: true })(variables));
},

@@ -104,3 +116,3 @@ isFieldABoolean: (data, value) => typeof data[value] === 'boolean',

label: (label) => (label ? label[language] || label[languages.default] : null),
mdToHTML: (s) => (typeof s === 'string' ? new handlebars_1.default.SafeString(idea_toolbox_1.mdToHtml(s)) : s),
mdToHTML: (s) => (typeof s === 'string' ? new handlebars_1.SafeString(idea_toolbox_1.mdToHtml(s)) : s),
translate: (s) => s && additionalTranslations && additionalTranslations[s] ? additionalTranslations[s] : s

@@ -107,0 +119,0 @@ };

2

package.json
{
"name": "idea-html2pdf",
"version": "1.0.0",
"version": "1.0.1",
"description": "IDEA helper for generating a PDF from HTML contents",

@@ -5,0 +5,0 @@ "engines": {

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