Registry / http-networking / biskviit

biskviit

JSON →
library2.0.0jsnpmunverified

Biskviit is a Node.js module designed for server-side HTTP cookie management. It provides functionality to parse `Set-Cookie` headers from incoming responses, store cookie data in memory, and then generate appropriate `Cookie` headers for outgoing requests based on a specified URL. The current stable version is 2.0.0, which was last updated in August 2017. Due to its age, the package is considered to have an abandoned release cadence. Its key differentiator is its straightforward, in-memory approach to handling cookie state per instance, including basic session timeout management for cookies without explicit expiration dates. It is specifically built for Node.js environments and requires Node.js v6 or higher.

npm install biskviit
INSTALL
IMPORT
SIG · BISKVIIT
B
biskviit
http-networkingjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Biskviit
const Biskviit = require('biskviit');
import Biskviit from 'biskviit'; import { Biskviit } from 'biskviit';
This package is CommonJS-only and does not provide native ESM exports. The default export is the Biskviit class itself. Node.js v6+ is required.

Demonstrates initializing a Biskviit instance, setting cookies from `Set-Cookie` headers, and retrieving them for specific URLs both as a header string and as an array of objects.

const Biskviit = require('biskviit'); // Create a cookie managing instance with a 5-minute session timeout const biskviit = new Biskviit({ sessionTimeout: 5 * 60 // expire cookies after 5 minutes }); // Simulate setting cookies from a 'Set-Cookie' header biskviit.set('theme=light', 'http://example.com/'); biskviit.set('sessionToken=abc123; Expires=Wed, 09 Jun 2029 10:18:14 GMT; Path=/', 'http://example.com/'); biskviit.set('another=cookie; Max-Age=3600', 'https://secure.example.com/app'); // Get cookies for a specific URL as a string for the 'Cookie' header const cookiesForExample = biskviit.get('http://example.com/path'); console.log('Cookies for example.com:', cookiesForExample); // Expected: theme=light; sessionToken=abc123 const cookiesForSecureExample = biskviit.get('https://secure.example.com/app/dashboard'); console.log('Cookies for secure.example.com:', cookiesForSecureExample); // Expected: another=cookie // List all available cookies for a URL as objects const cookieObjects = biskviit.list('http://example.com/'); console.log('Cookie objects for example.com:', cookieObjects);
Debug
Known issues
breakingThe package has not been updated since August 2017, indicating it is largely unmaintained. This poses risks for security vulnerabilities, compatibility issues with newer Node.js versions, and lack of modern features (e.g., native ESM support).
fix
Consider migrating to a more actively maintained HTTP cookie library for Node.js, especially for new projects or applications requiring robust security and modern features.
affects: >=2.0.0
gotchaBiskviit is a CommonJS-only module and does not provide native ECMAScript Modules (ESM) exports. Attempting to `import` Biskviit in an ESM context will result in a runtime error.
fix
Use CommonJS `require()` syntax: `const Biskviit = require('biskviit');`. If you must use it in an ESM project, you might need to use dynamic `import()` or a CommonJS wrapper, though migration is recommended.
affects: >=2.0.0
gotchaThe cookie storage is entirely in-memory for each `Biskviit` instance. Cookies are not persisted across application restarts or between different instances of the `Biskviit` class.
fix
If persistence is required, you must implement your own storage mechanism (e.g., to a file, database, or external cache) and manually load/save cookie data using Biskviit's `list` and `set` methods.
affects: >=2.0.0
gotchaThe package explicitly requires Node.js v6 or newer. Running it on older Node.js versions may lead to unexpected behavior or errors.
fix
Ensure your Node.js environment is version 6.0.0 or higher. It is generally advisable to use a significantly newer, actively supported Node.js LTS version.
affects: <2.0.0
Errors
Common errors & fixes
ReferenceError: require is not defined
Attempting to use `require()` in an ECMAScript Module (ESM) context.
fix
Biskviit is a CommonJS module. Either convert your file to CommonJS (`.js` without `"type": "module"` in `package.json`) or use dynamic `import()`: `const Biskviit = await import('biskviit').then(mod => mod.default);`.
TypeError: Biskviit is not a constructor
Incorrectly importing `Biskviit` or attempting to call it as a function instead of instantiating with `new`.
fix
Ensure you are using `const Biskviit = require('biskviit');` and then `const biskviit = new Biskviit(options);`.
Cookies are not being stored or retrieved correctly for a URL.
Mismatch between the URL provided to `set` and `get` (e.g., protocol, domain, or path differences) or incorrect `Set-Cookie` string format.
fix
Verify that the URL used with `get()` exactly matches the context for which the cookies were `set()`, considering domain, path, and secure flags. Ensure `cookieString` passed to `set()` is a valid `Set-Cookie` header value.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
biskviit — npm install biskviit · libregistry