@arcjet/headers
Advanced tools
+7
-7
| { | ||
| "name": "@arcjet/headers", | ||
| "version": "1.0.0-beta.9", | ||
| "version": "1.0.0-beta.10", | ||
| "description": "Arcjet extension of the Headers class", | ||
@@ -47,9 +47,9 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "@arcjet/eslint-config": "1.0.0-beta.9", | ||
| "@arcjet/rollup-config": "1.0.0-beta.9", | ||
| "@arcjet/tsconfig": "1.0.0-beta.9", | ||
| "@rollup/wasm-node": "4.44.2", | ||
| "@arcjet/eslint-config": "1.0.0-beta.10", | ||
| "@arcjet/rollup-config": "1.0.0-beta.10", | ||
| "@arcjet/tsconfig": "1.0.0-beta.10", | ||
| "@rollup/wasm-node": "4.46.2", | ||
| "@types/node": "18.18.0", | ||
| "eslint": "9.30.1", | ||
| "typescript": "5.8.3" | ||
| "eslint": "9.32.0", | ||
| "typescript": "5.9.2" | ||
| }, | ||
@@ -56,0 +56,0 @@ "publishConfig": { |
+21
-11
@@ -24,9 +24,23 @@ <a href="https://arcjet.com" target="_arcjet-home"> | ||
| ## Installation | ||
| ## What is this? | ||
| ```shell | ||
| npm install -S @arcjet/headers | ||
| This is an internal utility to help us deal with [`Headers`][mdn-headers]. | ||
| This exists to prevent the `cookie` header from being set and non-string values | ||
| from being set. | ||
| ## When should I use this? | ||
| You should not use this but use `Headers` or plain objects instead. | ||
| This package matches our current needs which are likely different from yours. | ||
| ## Install | ||
| This package is ESM only. | ||
| Install with npm in Node.js: | ||
| ```sh | ||
| npm install @arcjet/headers | ||
| ``` | ||
| ## Example | ||
| ## Use | ||
@@ -38,15 +52,11 @@ ```ts | ||
| console.log(headers.get("abc")); | ||
| console.log(headers.get("abc")); // => "123" | ||
| ``` | ||
| ## Considerations | ||
| This package will filter the `cookie` header and all headers with keys or values | ||
| that are not strings, such as `{ "abc": undefined }`. | ||
| ## License | ||
| Licensed under the [Apache License, Version 2.0][apache-license]. | ||
| [Apache License, Version 2.0][apache-license] © [Arcjet Labs, Inc.][arcjet] | ||
| [arcjet]: https://arcjet.com | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 | ||
| [mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18756
1.9%61
19.61%0
-100%