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

@fangxq/request

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fangxq/request - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

4

listen.d.ts
// import { TReq,TRes } from './shared';
type thandler = <TReq,TRes>(src: string, req: TReq) => Promise<{ data?: TRes, use_ws?: (ws: typeof global.WebSocket) => void }>
type thandler = <TReq, TRes>(src: string, req: TReq, res: { data?: TRes, use_ws?: (ws: typeof global.WebSocket) => Promise<void>})=> Promise<void>;
export async function listen<TReq,TRes>(host: string, port: number, handler: thandler<TReq,TRes>): Promise<import('https').Server>
export async function listen<TReq, TRes>(host: string, port: number, handler: thandler<TReq, TRes>): Promise<import('https').Server>

@@ -33,5 +33,7 @@ const fs = require('fs')

let result = await handler(src, data)
const result = {}
if(result.use_ws){
await handler(src, data, result)
if (result.use_ws) {
const ws_token = uuid()

@@ -38,0 +40,0 @@ const use_ws = result.use_ws

{
"name": "@fangxq/request",
"version": "0.0.27",
"version": "0.0.28",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

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