New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

array-to-html

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-to-html - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

16

lib/array-to-html.js

@@ -28,6 +28,6 @@ "use strict";

let bodyPiece = '';
let itemOfArray;
let itemOfArray = null;
let widthTd = '';
let hasColumSize = true;
let renderer;
let renderer = (el) => el;
minify || (minify = false);

@@ -63,8 +63,9 @@ fake_style || (fake_style = false);

if (hasColumSize) {
widthTd = columns_size[e] < 1 ? '' : ` width: ${columns_size[e]}%`;
widthTd = columns_size[e] < 1 ? '' : `width: ${columns_size[e]}%`;
}
if (headerFind === null || headerFind === void 0 ? void 0 : headerFind.width) {
widthTd = (headerFind === null || headerFind === void 0 ? void 0 : headerFind.width) < 1 ? '' : ` width: ${headerFind === null || headerFind === void 0 ? void 0 : headerFind.width}%`;
widthTd = (headerFind === null || headerFind === void 0 ? void 0 : headerFind.width) < 1 ? '' : `width: ${headerFind === null || headerFind === void 0 ? void 0 : headerFind.width}%`;
hasColumSize = true;
}
bodyPiece += `<td ${createFakeStyle(fake_style, 'tbody_td', widthTd)}> ${renderer(itemOfArray[headerKeys[e]])} </td> `;
bodyPiece += `<td ${createFakeStyle(fake_style, 'tbody_td', widthTd)}> ${renderer(itemOfArray[headerKeys[e] || ''])} </td> `;
}

@@ -82,3 +83,3 @@ body += `

table = `
<table ${createFakeStyle(fake_style, 'table')}>
<table ${createFakeStyle(fake_style, 'table', hasColumSize ? 'width: 100%' : '')}>
${headerHtml}

@@ -89,3 +90,4 @@ ${body}

table = table.replace(/\s\s/g, '');
table = table.replace(/\n/g, '');
table = table.replace(/[\n\t]/g, '');
table = table.replace(/ >/g, '>');
}

@@ -92,0 +94,0 @@ return table;

{
"name": "array-to-html",
"description": "Convert an array of objects to a simple markdown table.",
"version": "0.0.13",
"version": "0.0.14",
"main": "lib/array-to-html.js",

@@ -6,0 +6,0 @@ "author": "natancabral",

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