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

@worker-tools/response-creators

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@worker-tools/response-creators - npm Package Compare versions

Comparing version 1.2.0-pre.4 to 1.2.0-pre.5

4

package.json

@@ -6,3 +6,3 @@ {

"name": "@worker-tools/response-creators",
"version": "1.2.0-pre.4",
"version": "1.2.0-pre.5",
"description": "A collection of factory functions for Fetch API Response types with pre-filled status and status-text headers for well-known HTTP status codes.",

@@ -21,3 +21,3 @@ "license": "MIT",

},
"homepage": "https://workers.tools/#response-creators",
"homepage": "https://workers.tools/response-creators",
"keywords": [

@@ -24,0 +24,0 @@ "cloudflare-workers",

export type RequestInitExStatus = Omit<RequestInit, 'status' | 'statusText'>;
const mkResponse = (status: number, statusText: string) => (body: BodyInit | null = null, init: RequestInitExStatus = {}) => new Response(body, {
const mkResponse = (status: number, statusText: string) => (body: BodyInit | null = null, init: RequestInitExStatus = {}): Response => new Response(body, {
...init,

@@ -9,3 +9,3 @@ status,

const mkRedirect = (status: number, statusText: string) => (location: string | URL, init: RequestInitExStatus = {}) => new Response(null, {
const mkRedirect = (status: number, statusText: string) => (location: string | URL, init: RequestInitExStatus = {}): Response => new Response(null, {
...init,

@@ -20,3 +20,3 @@ status,

const mkUnauthorized = (status: number, statusText: string) => (realm = '', init: RequestInitExStatus = {}) => new Response(null, {
const mkUnauthorized = (status: number, statusText: string) => (realm = '', init: RequestInitExStatus = {}): Response => new Response(null, {
...init,

@@ -31,3 +31,3 @@ status,

const mkNotModified = (status: number, statusText: string) => (ifNoneMatch: string, ifModifiedSince: Date, init: RequestInitExStatus = {}) => new Response(null, {
const mkNotModified = (status: number, statusText: string) => (ifNoneMatch: string, ifModifiedSince: Date, init: RequestInitExStatus = {}): Response => new Response(null, {
...init,

@@ -34,0 +34,0 @@ status,

Sorry, the diff of this file is not supported yet

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