@chiselstrike/api
Advanced tools
Comparing version
@@ -124,4 +124,4 @@ /// <reference lib="dom" /> | ||
export declare function buildReadableStreamForBody(rid: number): ReadableStream<string>; | ||
export declare function json(body: unknown, status?: number): Response; | ||
export declare function responseFromJson(body: unknown, status?: number): Response; | ||
export declare function labels(..._val: string[]): <T>(_target: T, _propertyName: string) => void; | ||
export {}; |
@@ -267,3 +267,3 @@ // SPDX-FileCopyrightText: © 2021 ChiselStrike <info@chiselstrike.com> | ||
} | ||
export function json(body, status = 200) { | ||
export function responseFromJson(body, status = 200) { | ||
return new Response(JSON.stringify(body), { | ||
@@ -270,0 +270,0 @@ status: status, |
{ | ||
"name": "@chiselstrike/api", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"main": "lib/chisel.js", | ||
@@ -10,3 +10,4 @@ "types": "lib/chisel.d.ts", | ||
"scripts": { | ||
"build": "tsc --noResolve && cp -La ../../api/src/lib.deno_core.d.ts lib/" | ||
"prepare": "npm run build", | ||
"build": "rimraf ./lib && tsc --noResolve && cp -La ../../api/src/lib.deno_core.d.ts lib/" | ||
}, | ||
@@ -16,2 +17,5 @@ "dependencies": { | ||
}, | ||
"devDependencies": { | ||
"rimraf": "^3.0.2" | ||
}, | ||
"files": [ | ||
@@ -18,0 +22,0 @@ "/lib" |
20101
0.62%1
Infinity%