Socket
Socket
Sign inDemoInstall

rjweb-server

Package Overview
Dependencies
Maintainers
1
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rjweb-server - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

lib/interfaces/ctr.d.ts

@@ -21,3 +21,3 @@ /// <reference types="node" />

/** Set an HTTP Header to add */ setHeader: (name: string, value: string) => ctr;
/** Set a Custom Variable */ setCustom: (name: string, value: any) => ctr;
/** Set a Custom Variable */ setCustom: <Type extends keyof Custom>(name: Type, value: Custom[Type]) => ctr;
/** Print a Message to the Client */ print: (msg: any) => ctr;

@@ -24,0 +24,0 @@ /** The Request Status to Send */ status: (code: number) => ctr;

{
"name": "rjweb-server",
"version": "1.2.2",
"version": "1.2.3",
"description": "Easy and Lightweight Way to create a Web Server in Node.js",

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

@@ -294,4 +294,8 @@ <h1 align="center">Welcome to rjweb-server 👋</h1>

Javascript
https://replit.com/@RobertJansen/aous
Typescript
https://replit.com/@RobertJansen/aous-ts
## Author

@@ -298,0 +302,0 @@

@@ -211,9 +211,9 @@ import ctr, { ctrError } from "./interfaces/ctr"

// Functions
setHeader(name: string, value: string) {
setHeader(name, value) {
res.setHeader(name, value)
return ctr
}, setCustom(name: string, value: any) {
}, setCustom(name, value) {
ctr['@'][name] = value
return ctr
}, print(msg: any) {
}, print(msg) {
switch (typeof msg) {

@@ -260,6 +260,6 @@ case 'object':

}; return ctr
}, status(code: number) {
}, status(code) {
res.statusCode = code
return ctr
}, printFile(file: string) {
}, printFile(file) {
const content = fs.readFileSync(file)

@@ -266,0 +266,0 @@ res.write(content, 'binary')

@@ -21,3 +21,3 @@ import { Server, IncomingMessage, ServerResponse } from "http"

/** Set an HTTP Header to add */ setHeader: (name: string, value: string) => ctr
/** Set a Custom Variable */ setCustom: (name: string, value: any) => ctr
/** Set a Custom Variable */ setCustom: <Type extends keyof Custom>(name: Type, value: Custom[Type]) => ctr
/** Print a Message to the Client */ print: (msg: any) => ctr

@@ -24,0 +24,0 @@ /** The Request Status to Send */ status: (code: number) => ctr

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