You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

hapi-transform-table

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-transform-table - npm Package Compare versions

Comparing version

to
1.8.1

6

index.js

@@ -11,4 +11,4 @@ const jsonToTable = require('json-to-table');

const rows = table.slice(1).reduce((tableString, n) => `${tableString}<tr><td>${n.join('</td><td>')}</td></tr>${os.EOL}`, '');
let css = options.css.map(link => `<link rel="stylesheet" type="text/css" href=${link}>`).join(os.EOL);
css = `<style>
const css = options.css.map(link => `<link rel="stylesheet" type="text/css" href="${link}">`).join(os.EOL);
const cssFonts = `<style>
body {

@@ -19,3 +19,3 @@ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

const scripts = options.scripts.map(link => `<script type="text/javascript" src="${link}"></script>`).join(os.EOL);
return `${css}${css ? os.EOL : ''}${scripts}${scripts ? os.EOL : ''}<table${tableAttributes}>${os.EOL}${header}${os.EOL}<tbody>${rows}</tbody>${os.EOL}</table>`;
return `${cssFonts}${os.EOL}${css}${os.EOL}${scripts}${os.EOL}<table${tableAttributes}>${os.EOL}${header}${os.EOL}<tbody>${rows}</tbody>${os.EOL}</table>`;
};

@@ -22,0 +22,0 @@

{
"name": "hapi-transform-table",
"version": "1.8.0",
"version": "1.8.1",
"description": "hapi plugin for routes that need to return json as HTML tables ",

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