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

awebserver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awebserver - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

17

index.js

@@ -76,4 +76,9 @@ (function() {

req.pathname = parsed.pathname;
res.jsonResponse = (code, body) => {
res.writeHead(code, { "Content-Type": "application/json" });
res.jsonResponse = (code, body, headers = false) => {
if (headers) {
res.writeHead(code, headers);
} else {
res.writeHead(code, { "Content-Type": "application/json" });
}
res.write(JSON.stringify(body));

@@ -83,4 +88,8 @@ res.end();

res.response = (code, body) => {
res.writeHead(code, { "Content-Type": "text/html" });
res.response = (code, body, headers = false) => {
if (headers) {
res.writeHead(code, headers);
} else {
res.writeHead(code, { "Content-Type": "text/html" });
}
res.write(body);

@@ -87,0 +96,0 @@ res.end();

{
"name": "awebserver",
"version": "1.0.2",
"version": "1.0.3",
"description": "this is a simple library to create a web server",

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

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