@literate.ink/utilities
Advanced tools
Comparing version 1.0.0-10240580831.1 to 1.0.0-10251128934.1
@@ -12,2 +12,3 @@ interface HeadersLike { | ||
declare const getHeaderFromResponse: (response: Response, item: string) => string | null; | ||
declare const setHeaderToRequest: (request: Request, key: string, value: string) => void; | ||
interface Request { | ||
@@ -46,2 +47,2 @@ url: string; | ||
export { type Fetcher, type Request, type Response, defaultFetcher, getCookiesFromResponse, getHeaderFromResponse }; | ||
export { type Fetcher, type Request, type Response, defaultFetcher, getCookiesFromResponse, getHeaderFromResponse, setHeaderToRequest }; |
@@ -1,1 +0,1 @@ | ||
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,n={};((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(n,{defaultFetcher:()=>u,getCookiesFromResponse:()=>c,getHeaderFromResponse:()=>i}),module.exports=(e=n,((e,n,a,c)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let i of o(n))s.call(e,i)||i===a||t(e,i,{get:()=>n[i],enumerable:!(c=r(n,i))||c.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a=require("set-cookie-parser"),c=e=>{const t=i(e,"set-cookie");return null===t?[]:(0,a.splitCookiesString)(t).map((e=>e.split(";")[0]))},i=(e,t)=>{const r=e.headers;return"function"==typeof r.get?r.get(t):r[t]},u=async e=>{const t=await fetch(e.url,{redirect:e.redirect,headers:e.headers,method:e.method,body:e.content});return{status:t.status,content:await t.text(),headers:t.headers}};//# sourceMappingURL=index.js.map | ||
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a={};((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(a,{defaultFetcher:()=>p,getCookiesFromResponse:()=>c,getHeaderFromResponse:()=>d,setHeaderToRequest:()=>i}),module.exports=(e=a,((e,a,n,c)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let d of o(a))s.call(e,d)||d===n||t(e,d,{get:()=>a[d],enumerable:!(c=r(a,d))||c.enumerable});return e})(t({},"__esModule",{value:!0}),e));var n=require("set-cookie-parser"),c=e=>{const t=d(e,"set-cookie");return null===t?[]:(0,n.splitCookiesString)(t).map((e=>e.split(";")[0]))},d=(e,t)=>{const r=e.headers;return u(r)?r.get(t):r[t]},u=e=>"function"==typeof e.get,i=(e,t,r)=>{e.headers||(e.headers={}),u(e.headers)?e.headers.set(t,r):e.headers[t]=r},p=async e=>{const t=await fetch(e.url,{redirect:e.redirect,headers:e.headers,method:e.method,body:e.content});return{status:t.status,content:await t.text(),headers:t.headers}};//# sourceMappingURL=index.js.map |
{ | ||
"name": "@literate.ink/utilities", | ||
"version": "1.0.0-10240580831.1", | ||
"version": "1.0.0-10251128934.1", | ||
"description": "A general package containing utilities for helping building our libraries.", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13487
45