rjweb-server
Advanced tools
Comparing version 0.1.3 to 0.1.4
11
index.js
@@ -114,12 +114,5 @@ const sleep = (milliseconds) => Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds) | ||
print(msg) { | ||
let isJSON = true | ||
try { | ||
JSON.parse(msg) | ||
} catch (e) { | ||
isJSON = false | ||
} | ||
if (isJSON) { | ||
if (typeof msg === 'object') { | ||
res.writeHead(200, { 'Content-Type': 'application/json' }) | ||
res.write(JSON.parse(msg)) | ||
res.write(JSON.stringify(msg)) | ||
} else { | ||
@@ -126,0 +119,0 @@ res.write(msg) |
{ | ||
"name": "rjweb-server", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Easy Way to create a Web Server in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8559
150