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

pdfkit-table

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfkit-table - npm Package Compare versions

Comparing version 0.1.98 to 0.1.99

36

index.js

@@ -404,3 +404,3 @@ // jshint esversion: 6

// (table width) 2o - Size defined
options.width && ( w = String(options.width).replace(/[^0-9]/g,'') >> 0 );
options.width && ( w = parseInt(options.width) || String(options.width).replace(/[^0-9]/g,'') >> 0 );

@@ -931,16 +931,30 @@ // (table width) if table is percent of page

async tables(tables, callback) {
return new Promise((resolve, reject) => {
return new Promise(async (resolve, reject) => {
try {
if(Array.isArray(tables) === false)
{
resolve();
return;
}
const len = tables.length;
for(let i; i < len; i++)
{
await this.table(tables[i], tables[i].options || {});
}
// if tables is Array
Array.isArray(tables) ?
// for each on Array
tables.forEach( async table => await this.table( table, table.options || {} ) ) :
// else is tables is a unique table object
( typeof tables === 'object' ? this.table( tables, tables.options || {} ) : null ) ;
// callback
// Array.isArray(tables) ?
// // for each on Array
// tables.forEach( async table => await this.table( table, table.options || {} ) ) :
// // else is tables is a unique table object
// ( typeof tables === 'object' ? this.table( tables, tables.options || {} ) : null ) ;
// // callback
typeof callback === 'function' && callback(this);
// donw!
// // donw!
resolve();
} catch (error) {
}
catch(error)
{
reject(error);

@@ -955,2 +969,2 @@ }

module.exports = PDFDocumentWithTables;
module.exports.default = PDFDocumentWithTables;
module.exports.default = PDFDocumentWithTables;
{
"name": "pdfkit-table",
"version": "0.1.98",
"version": "0.1.99",
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ",

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

@@ -263,4 +263,4 @@ <p align="center">

| **headerAlign** | <code>String</code> | left | only header |
| **columnColor** or backgroundColor | <code>String</code> | undefined | color of column |
| **columnOpacity** or backgroundOpacity| <code>Number</code> | undefined | opacity of column |
| **columnColor** or ~~backgroundColor~~ | <code>String</code> | undefined | color of column |
| **columnOpacity** or ~~backgroundOpacity~~| <code>Number</code> | undefined | opacity of column |
| **renderer** | <code>Function</code> | Function | function( value, indexColumn, indexRow, row, rectRow, rectCell ) { return value } |

@@ -267,0 +267,0 @@

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