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

@ne1410s/xprest

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ne1410s/xprest - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

8

dist/ne14_xprest.cjs.min.js

@@ -51,7 +51,7 @@ 'use strict';

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
*/
Xprest.prototype.resource = function (apiRoute, localPath) {
this.api['get'](apiRoute, function (_req, res) {
res.sendFile(path.resolve(__dirname, localPath));
res.sendFile(path.resolve(process.cwd(), localPath));
});

@@ -62,3 +62,3 @@ };

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
* @param variables Exposed in the rendering of the file. For example:

@@ -69,3 +69,3 @@ * <%= new Date().getTime() * myVar.myProp %>

this.api['get'](apiRoute, function (_req, res) {
res.render(path.resolve(__dirname, localPath), variables);
res.render(path.resolve(process.cwd(), localPath), variables);
});

@@ -72,0 +72,0 @@ };

@@ -45,7 +45,7 @@ import cors from 'cors';

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
*/
Xprest.prototype.resource = function (apiRoute, localPath) {
this.api['get'](apiRoute, function (_req, res) {
res.sendFile(resolve(__dirname, localPath));
res.sendFile(resolve(process.cwd(), localPath));
});

@@ -56,3 +56,3 @@ };

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
* @param variables Exposed in the rendering of the file. For example:

@@ -63,3 +63,3 @@ * <%= new Date().getTime() * myVar.myProp %>

this.api['get'](apiRoute, function (_req, res) {
res.render(resolve(__dirname, localPath), variables);
res.render(resolve(process.cwd(), localPath), variables);
});

@@ -66,0 +66,0 @@ };

@@ -7,3 +7,3 @@ export declare class Xprest {

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
*/

@@ -14,3 +14,3 @@ resource(apiRoute: string, localPath: string): void;

* @param apiRoute The api route.
* @param localPath The local file path.
* @param localPath The file path, relative to the cwd.
* @param variables Exposed in the rendering of the file. For example:

@@ -17,0 +17,0 @@ * <%= new Date().getTime() * myVar.myProp %>

{
"name": "@ne1410s/xprest",
"version": "0.0.3",
"version": "0.0.4",
"description": "RESTful express core library",

@@ -46,3 +46,2 @@ "main": "dist/ne14_xprest.cjs.min.js",

"chai": "^4.2.0",
"ejs": "^3.1.3",
"mocha": "^8.0.1",

@@ -58,2 +57,3 @@ "prettier": "^2.0.5",

"cors": "^2.8.5",
"ejs": "^3.1.3",
"express": "^4.17.1",

@@ -60,0 +60,0 @@ "jws": "^4.0.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