🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

cloudly-http

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudly-http - npm Package Compare versions

Comparing version

to
0.2.0-alpha.12

@@ -68,2 +68,7 @@ export type Header = {

function toString(header: Header): string;
type Name = keyof Header;
namespace Name {
function to(name: string): Name | string;
function from(name: Name | string): string;
}
}

@@ -105,3 +105,16 @@ import * as CamelCase from "../CamelCase";

}
let Name;
(function (Name) {
function to(name) {
const field = fields.find(([camelCase, n, l]) => camelCase == name);
return field ? field[1] : CamelCase.from(name);
}
Name.to = to;
function from(name) {
const field = fields.find(([c, n, l]) => name.toLowerCase() == n.toLowerCase());
return field ? field[0] : CamelCase.to(name);
}
Name.from = from;
})(Name = Header.Name || (Header.Name = {}));
})(Header || (Header = {}));
//# sourceMappingURL=Header.js.map

@@ -30,8 +30,4 @@ /// <reference lib="webworker.iterable" />

type Header = RequestHeader;
namespace Header {
const is: typeof RequestHeader.is;
const from: typeof RequestHeader.from;
const to: typeof RequestHeader.to;
}
const Header: typeof RequestHeader;
type Like<T = any | Promise<any>> = RequestLike<T>;
}

@@ -66,9 +66,4 @@ import { ContentType } from "../ContentType";

Request.create = create;
let Header;
(function (Header) {
Header.is = RequestHeader.is;
Header.from = RequestHeader.from;
Header.to = RequestHeader.to;
})(Header = Request.Header || (Request.Header = {}));
Request.Header = RequestHeader;
})(Request || (Request = {}));
//# sourceMappingURL=index.js.map

@@ -70,2 +70,7 @@ export type Header = {

function toString(header: Header): string;
type Name = keyof Header;
namespace Name {
function to(name: string): Name | string;
function from(name: Name | string): string;
}
}

@@ -112,3 +112,16 @@ import * as CamelCase from "../CamelCase";

}
let Name;
(function (Name) {
function to(name) {
const field = fields.find(([camelCase, n, l]) => camelCase == name);
return field ? field[1] : CamelCase.from(name);
}
Name.to = to;
function from(name) {
const field = fields.find(([c, n, l]) => name.toLowerCase() == n.toLowerCase());
return field ? field[0] : CamelCase.to(name);
}
Name.from = from;
})(Name = Header.Name || (Header.Name = {}));
})(Header || (Header = {}));
//# sourceMappingURL=Header.js.map
{
"name": "cloudly-http",
"version": "0.2.0-alpha.11",
"version": "0.2.0-alpha.12",
"description": "Improved handling of HTTP Requests and Responses.",

@@ -59,5 +59,5 @@ "author": "Simon Mika <simon@mika.se>",

"@types/jest": "^29.4.0",
"@typescript-eslint/eslint-plugin": "5.53.0",
"@typescript-eslint/parser": "5.53.0",
"eslint": "^8.34.0",
"@typescript-eslint/eslint-plugin": "5.54.1",
"@typescript-eslint/parser": "5.54.1",
"eslint": "^8.35.0",
"eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20221229",

@@ -67,6 +67,6 @@ "eslint-plugin-simple-import-sort": "^10.0.0",

"isomorphic-fetch": "^3.0.0",
"jest": "^29.4.3",
"jest": "^29.5.0",
"jest-websocket-mock": "^2.4.0",
"prettierx": "github:utily/prettierx#utily-20221229",
"rimraf": "^4.1.2",
"rimraf": "^4.3.1",
"ts-jest": "^29.0.5",

@@ -73,0 +73,0 @@ "typescript": "^4.9.5"

@@ -170,2 +170,13 @@ import * as CamelCase from "../CamelCase"

}
export type Name = keyof Header
export namespace Name {
export function to(name: string): Name | string {
const field = fields.find(([camelCase, n, l]) => camelCase == name)
return field ? field[1] : CamelCase.from(name)
}
export function from(name: Name | string): string {
const field = fields.find(([c, n, l]) => name.toLowerCase() == n.toLowerCase())
return field ? field[0] : CamelCase.to(name)
}
}
}

@@ -91,8 +91,4 @@ /// <reference lib="webworker.iterable" />

export type Header = RequestHeader
export namespace Header {
export const is = RequestHeader.is
export const from = RequestHeader.from
export const to = RequestHeader.to
}
export const Header = RequestHeader
export type Like<T = any | Promise<any>> = RequestLike<T>
}

@@ -178,2 +178,13 @@ import * as CamelCase from "../CamelCase"

}
export type Name = keyof Header
export namespace Name {
export function to(name: string): Name | string {
const field = fields.find(([camelCase, n, l]) => camelCase == name)
return field ? field[1] : CamelCase.from(name)
}
export function from(name: Name | string): string {
const field = fields.find(([c, n, l]) => name.toLowerCase() == n.toLowerCase())
return field ? field[0] : CamelCase.to(name)
}
}
}

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