Socket
Socket
Sign inDemoInstall

rjweb-server

Package Overview
Dependencies
0
Maintainers
1
Versions
369
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

16

index.js

@@ -113,3 +113,17 @@ const sleep = (milliseconds) => Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds)

// Functions
print(msg) { res.write(JSON.stringify(msg)) },
print(msg) {
let isJSON = true
try {
JSON.parse(msg)
} catch (e) {
isJSON = false
}
if (isJSON) {
res.writeHead(200, { 'Content-Type': 'application/json' })
res.write(JSON.parse(msg))
} else {
res.write(msg)
}
},
status(code) { res.statusCode = code }

@@ -116,0 +130,0 @@ }

2

package.json
{
"name": "rjweb-server",
"version": "0.1.2",
"version": "0.1.3",
"description": "Easy Way to create a Web Server in Node.js",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc