Socket
Socket
Sign inDemoInstall

h3

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h3 - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.2.9](https://github.com/unjs/h3/compare/v0.2.8...v0.2.9) (2021-04-06)
### Bug Fixes
* resolve handle when send was called ([fb58e5b](https://github.com/unjs/h3/commit/fb58e5b274272ba55df4bb38b874a688b617d541))
### [0.2.8](https://github.com/unjs/h3/compare/v0.2.7...v0.2.8) (2021-03-27)

@@ -7,0 +14,0 @@

2

dist/index.d.ts

@@ -205,3 +205,3 @@ import { IncomingMessage, ServerResponse } from 'http';

declare function send(res: ServerResponse, data: any, type?: string): void;
declare function send(res: ServerResponse, data: any, type?: string): Promise<unknown>;
declare function defaultContentType(res: ServerResponse, type?: string): void;

@@ -208,0 +208,0 @@ declare function sendRedirect(res: ServerResponse, location: string, code?: number): void;

@@ -418,3 +418,8 @@ 'use strict';

}
setImmediate(() => res.end(data));
return new Promise((resolve) => {
setImmediate(() => {
res.end(data);
resolve(void 0);
});
});
}

@@ -559,11 +564,9 @@ function defaultContentType(res, type) {

if (type === "string") {
send(res, val, MIMES.html);
return;
return send(res, val, MIMES.html);
} else if (type === "object" && val !== void 0) {
if (val.buffer) {
send(res, val);
return send(res, val);
} else {
send(res, JSON.stringify(val, null, 2), MIMES.json);
return send(res, JSON.stringify(val, null, 2), MIMES.json);
}
return;
}

@@ -570,0 +573,0 @@ }

{
"name": "h3",
"version": "0.2.8",
"version": "0.2.9",
"description": "Tiny JavaScript Server",

@@ -5,0 +5,0 @@ "repository": "unjs/h3",

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