Converts PHP session strings (stored in Redis or elsewhere) into JavaScript objects. Version 0.2.2 processes PHP session format including session ID prefix and serialized PHP data. Lightweight utility with no dependencies, supports Node.js 4+. Unlike full PHP serialization libraries, this focuses solely on session deserialization and handles common edge cases like nested arrays and objects. Low release cadence; browser support listed as TODO.
npm install php-session-unserializeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a PHP session string (with session ID) into a JavaScript object using the default export function.
Ensure input is in 'sessionId|serializedData' format.
Use a more comprehensive PHP serialization parser for full support.
Check the source code for supported types; submit a PR for missing ones.
Escape or encode semicolons in PHP session data.
Use require: const parser = require('php-session-unserialize')Check that session string is provided and is a non-empty string.
No dependency data recorded yet.