@ooneex/http-header 0.17.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -29
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,25 +1,21 @@
1
1
  # @ooneex/http-header
2
2
 
3
- A comprehensive TypeScript/JavaScript library for working with HTTP headers. This package provides powerful classes and utilities to easily manipulate, read, and manage HTTP headers with type safety and convenient methods for common operations.
3
+ HTTP header parser with user agent detection, browser fingerprinting, device identification, and content negotiation utilities.
4
4
 
5
5
  ![Browser](https://img.shields.io/badge/Browser-Compatible-green?style=flat-square&logo=googlechrome)
6
6
  ![Bun](https://img.shields.io/badge/Bun-Compatible-orange?style=flat-square&logo=bun)
7
- ![Deno](https://img.shields.io/badge/Deno-Compatible-blue?style=flat-square&logo=deno)
8
- ![Node.js](https://img.shields.io/badge/Node.js-Compatible-green?style=flat-square&logo=node.js)
9
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript)
10
8
  ![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)
11
9
 
12
10
  ## Features
13
11
 
14
- ✅ **Complete Header Management** - Full support for reading and writing HTTP headers
12
+ ✅ **Read/Write Header Management** - Full support via `Header` (read/write) and `ReadonlyHeader` (read-only) classes
15
13
 
16
- ✅ **Type-Safe** - Full TypeScript support with proper type definitions
17
-
18
- ✅ **User Agent Parsing** - Built-in user agent detection and parsing with device information
14
+ ✅ **User Agent Parsing** - Built-in user agent detection powered by ua-parser-js with browser, OS, device, and CPU info
19
15
 
20
- ✅ **Content Type Handling** - Easy MIME type and charset management
16
+ ✅ **Content Negotiation** - Easy MIME type, charset, language, and encoding management
21
17
 
22
- ✅ **Authentication Support** - Built-in methods for Basic Auth, Bearer tokens
18
+ ✅ **Authentication Support** - Built-in methods for Basic Auth, Bearer tokens, and custom authorization
23
19
 
24
20
  ✅ **Cookie Management** - Comprehensive cookie parsing and setting with all options
25
21
 
@@ -27,38 +23,24 @@ A comprehensive TypeScript/JavaScript library for working with HTTP headers. Thi
27
23
 
28
24
  ✅ **Security Headers** - Built-in support for common security headers (CSP, HSTS, XSS)
29
25
 
30
- ✅ **Caching Headers** - Cache control and ETags management
26
+ ✅ **Caching Headers** - Cache control, ETags, and conditional request management
31
27
 
32
- ✅ **Client IP Detection** - Multiple methods to detect client IP addresses
28
+ ✅ **Client IP Detection** - Multiple methods to detect client IP addresses (X-Forwarded-For, X-Real-IP)
29
+
30
+ ✅ **Request Type Detection** - Detect HTTPS, AJAX, and CORS requests
33
31
 
34
32
  ✅ **Method Chaining** - Fluent API for easy header manipulation
35
33
 
36
- ✅ **Cross-Platform** - Works in Browser, Node.js, Bun, and Deno
34
+ ✅ **Type-Safe** - Full TypeScript support with proper type definitions
37
35
 
38
- ✅ **Zero Config** - Works out of the box with sensible defaults
36
+ ✅ **Cross-Platform** - Works in Browser, Node.js, Bun, and Deno
39
37
 
40
38
  ## Installation
41
39
 
42
- ### Bun
43
40
  ```bash
44
41
  bun add @ooneex/http-header
45
42
  ```
46
43
 
47
- ### pnpm
48
- ```bash
49
- pnpm add @ooneex/http-header
50
- ```
51
-
52
- ### Yarn
53
- ```bash
54
- yarn add @ooneex/http-header
55
- ```
56
-
57
- ### npm
58
- ```bash
59
- npm install @ooneex/http-header
60
- ```
61
-
62
44
  ## Usage
63
45
 
64
46
  ### Basic Header Operations
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ooneex/http-header",
3
- "description": "HTTP header parsing with user agent detection, browser identification, and device information extraction",
4
- "version": "0.17.0",
3
+ "description": "HTTP header parser with user agent detection, browser fingerprinting, device identification, and content negotiation utilities",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -31,8 +31,8 @@
31
31
  "ua-parser-js": "^2.0.6"
32
32
  },
33
33
  "devDependencies": {
34
- "@ooneex/http-mimes": "0.0.17",
35
- "@ooneex/types": "0.0.17"
34
+ "@ooneex/http-mimes": "0.0.18",
35
+ "@ooneex/types": "0.0.19"
36
36
  },
37
37
  "keywords": [
38
38
  "browser",