A key-value storage tool similar to sessionStorage but capable of cross-domain data storage and transfer within the same window. It uses window.name to store data, with a lifespan tied to the window session. Version 1.3.0 is the latest stable release, though the project appears to be in maintenance mode with no recent updates. Key differentiators include cross-domain support without server-side proxies and a simple API modeled after Web Storage. It enforces usage conventions to avoid direct window.name manipulation and minimize data conflicts.
npm install name-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: import, set, get, remove, and clear operations with nameStorage.
Use JSON.stringify before setItem and JSON.parse after getItem for objects.
Always use nameStorage API (setItem, getItem, removeItem, clear) instead of directly accessing window.name.
Use sessionStorage, localStorage, or cookies if longer persistence or cross-tab sharing is needed.
Consider migrating to modern alternatives like sessionStorage or cross-domain storage solutions with postMessage.
Use default import: import nameStorage from 'name-storage';
Ensure the import statement is present and the package is installed.
Avoid direct window.name assignment; coordinate with other code using the same window.
No dependency data recorded yet.