{"id":48653,"library":"name-storage","title":"nameStorage","description":"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.","status":"maintenance","version":"1.3.0","language":"javascript","source_language":"en","source_url":"git@github.com:aralejs/name-storage","tags":["javascript","arale","utility"],"install":[{"cmd":"npm install name-storage","lang":"bash","label":"npm"},{"cmd":"yarn add name-storage","lang":"bash","label":"yarn"},{"cmd":"pnpm add name-storage","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; named import will fail.","wrong":"import { nameStorage } from 'name-storage'","symbol":"nameStorage","correct":"import nameStorage from 'name-storage'"},{"note":"Value must be a string; objects are not automatically serialized.","wrong":"nameStorage.setItem('key', {})","symbol":"setItem","correct":"nameStorage.setItem('key', 'value')"},{"note":"Direct property access is not supported.","wrong":"nameStorage['key']","symbol":"getItem","correct":"nameStorage.getItem('key')"},{"note":"Use the dedicated method to ensure proper cleanup.","wrong":"delete nameStorage['key']","symbol":"removeItem","correct":"nameStorage.removeItem('key')"},{"note":"Directly clearing window.name may corrupt data from other modules.","wrong":"window.name = ''","symbol":"clear","correct":"nameStorage.clear()"}],"quickstart":{"code":"// Install: npm install name-storage\nimport nameStorage from 'name-storage';\n\n// Store a value\nnameStorage.setItem('name', 'Alice');\n\n// Retrieve the value\nconst storedName = nameStorage.getItem('name');\nconsole.log(storedName); // 'Alice'\n\n// Remove a value\nnameStorage.removeItem('name');\n\n// Clear all stored data\nnameStorage.clear();\n\n// Note: Values must be strings; use JSON.stringify/parse for objects.","lang":"javascript","description":"Demonstrates basic usage: import, set, get, remove, and clear operations with nameStorage."},"warnings":[{"fix":"Use JSON.stringify before setItem and JSON.parse after getItem for objects.","message":"Value must be a string. Non-string values are not automatically serialized.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always use nameStorage API (setItem, getItem, removeItem, clear) instead of directly accessing window.name.","message":"Direct manipulation of window.name may corrupt data stored by nameStorage or other modules.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use sessionStorage, localStorage, or cookies if longer persistence or cross-tab sharing is needed.","message":"nameStorage data is limited to the current window session; it persists across page navigations within the same window but not across tabs.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider migrating to modern alternatives like sessionStorage or cross-domain storage solutions with postMessage.","message":"The package is no longer actively maintained and may have unresolved issues.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.3.0':40 'api':74 'appear':49 'aral':93 'avoid':84 'capabl':12 'conflict':91 'convent':82 'cross':15,63 'cross-domain':14,62 'data':17,30,90 'differenti':60 'direct':85 'domain':16,64 'enforc':80 'includ':61 'javascript':92 'key':4,59 'key-valu':3 'latest':43 'lifespan':33 'mainten':53 'manipul':87 'minim':89 'mode':54 'model':75 'namestorag':1 'project':48 'proxi':70 'recent':57 'releas':45 'server':68 'server-sid':67 'session':38 'sessionstorag':10 'side':69 'similar':8 'simpl':73 'stabl':44 'storag':6,18,78 'store':29 'support':65 'though':46 'tie':34 'tool':7 'transfer':20 'updat':58 'usag':81 'use':26 'util':94 'valu':5 'version':39 'web':77 'window':24,37 'window.name':27,86 'within':21 'without':66","created_at":"2026-06-07T16:57:45.043895+00:00","updated_at":"2026-06-07T16:57:45.043895+00:00","problems":[{"fix":"Use default import: import nameStorage from 'name-storage';","cause":"Incorrect import (named instead of default) or module not loaded.","error":"TypeError: nameStorage.getItem is not a function"},{"fix":"Ensure the import statement is present and the package is installed.","cause":"The name-storage module was not imported or bundled.","error":"ReferenceError: nameStorage is not defined"},{"fix":"Avoid direct window.name assignment; coordinate with other code using the same window.","cause":"Direct modification of window.name by other scripts.","error":"Uncaught Error: nameStorage data corrupted"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/aralejs/name-storage","github":"git@github.com:aralejs/name-storage","docs":null,"changelog":null,"pypi":null,"npm":"name-storage","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}