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

html-express-js

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-express-js - npm Package Compare versions

Comparing version

to
4.1.0

4

package.json
{
"name": "html-express-js",
"version": "4.0.0",
"version": "4.1.0",
"description": "An Express template engine to render HTML views using native JavaScript",

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

"reload": "^3.2.0",
"sinon": "^20.0.0",
"sinon": "^21.0.0",
"typescript": "^5.4.3"
}
}

@@ -8,5 +8,5 @@ /**

* @param {Record<string, any>} [data]
* @returns {Promise<void>} HTML with includes available (appended to state)
* @returns {Promise<string>} HTML with includes available (appended to state)
*/
export function renderView(filePath: string, req: import("express").Request, res: import("express").Response, data?: Record<string, any>): Promise<void>;
export function renderView(filePath: string, req: import("express").Request, res: import("express").Response, data?: Record<string, any>): Promise<string>;
/**

@@ -13,0 +13,0 @@ * Template literal that supports string

@@ -82,3 +82,3 @@ import { basename, extname } from 'path';

* @param {Record<string, any>} [data]
* @returns {Promise<void>} HTML with includes available (appended to state)
* @returns {Promise<string>} HTML with includes available (appended to state)
*/

@@ -89,2 +89,3 @@ export async function renderView(filePath, req, res, data = {}) {

res.send(html);
return html;
}

@@ -91,0 +92,0 @@