@arcjet/headers
Advanced tools
+5
-5
| { | ||
| "name": "@arcjet/headers", | ||
| "version": "1.3.0", | ||
| "version": "1.3.1", | ||
| "description": "Arcjet extension of the Headers class", | ||
@@ -46,7 +46,7 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "@arcjet/eslint-config": "1.3.0", | ||
| "@arcjet/rollup-config": "1.3.0", | ||
| "@rollup/wasm-node": "4.57.1", | ||
| "@arcjet/eslint-config": "1.3.1", | ||
| "@arcjet/rollup-config": "1.3.1", | ||
| "@rollup/wasm-node": "4.59.0", | ||
| "@types/node": "24.11.0", | ||
| "eslint": "9.39.2", | ||
| "eslint": "9.39.3", | ||
| "typescript": "5.9.3" | ||
@@ -53,0 +53,0 @@ }, |
+26
-0
@@ -0,1 +1,3 @@ | ||
| <!-- trunk-ignore-all(markdownlint/MD001) --> | ||
| <a href="https://arcjet.com" target="_arcjet-home"> | ||
@@ -54,2 +56,24 @@ <picture> | ||
| ## API | ||
| This package exports the identifier | ||
| [`ArcjetHeaders`][api-arcjet-headers]. | ||
| The default export is [`ArcjetHeaders`][api-arcjet-headers]. | ||
| This package exports no [TypeScript][] types. | ||
| ### `new ArcjetHeaders([init])` | ||
| Creates a new `ArcjetHeaders` instance. We use this internally to prevent | ||
| the `cookie` header from being set and to ensure only string values are used. | ||
| ###### Parameters | ||
| - `init` (`Headers | Array<[string, string]> | Record<string, Array<string> | string | undefined>`, optional) | ||
| — initial headers to set | ||
| ###### Returns | ||
| An `ArcjetHeaders` instance that extends the standard `Headers` class. | ||
| ## License | ||
@@ -61,2 +85,4 @@ | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 | ||
| [api-arcjet-headers]: #new-arcjetheadersinit | ||
| [mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers | ||
| [typescript]: https://www.typescriptlang.org/ |
18953
4.19%87
42.62%