{"_id":"@david-fernando/nodelocalstorage","_rev":"7-bced5133a2f578dd618fb134e1fa85ab","name":"@david-fernando/nodelocalstorage","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@david-fernando/nodelocalstorage","version":"1.0.0","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.0","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"84a9b2544297224bf65393feae0079534b8742b5","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.0.tgz","fileCount":4,"integrity":"sha512-BXkXZggL62utgUGsSE8Lhh7ozsNMWbLGmev5iFzhruDP7Cd3wDTru0BYGvx3z7L1xY+g0dqs/Uwu5eJdp4vobg==","signatures":[{"sig":"MEQCIA+Zd3JoCbQuSMpxrkAX99sBXRy/XDU8kjItWcpzToVOAiAZfkrmcxivhT7Pp7MGKedCBa+g9aiAMrDEfG7+HwrABQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4912},"main":"index.js","type":"module","gitHead":"95c48dcd23b8f5b0119e1a58e49708b461f89af5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.0_1742218178823_0.45183456634784336","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@david-fernando/nodelocalstorage","version":"1.0.1","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.1","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"1d7126b302cf7cb7fed6eaef9e959a01af79af61","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.1.tgz","fileCount":4,"integrity":"sha512-O4UJ1GViQLoPdS1zu2yIxa4FDGh3YC+qslEL64Ffs+mPOiaIdv/KRQAzNTi7Qp7WQNIEs/WNezTPTjLOnXXu5w==","signatures":[{"sig":"MEQCIGfvfGDyD88Gg8HIiEaOiVL6GZinXLI8CKDtAEH1Qrr4AiBTJi1fUPQkzbi6bpWl2uETeeA48zFCjZJCu4yWjmV0wg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4990},"main":"index.js","type":"module","gitHead":"dd1248a1c332cfb9cb0c76998462c6ed53a2e581","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.1_1742218344650_0.013137088866011393","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@david-fernando/nodelocalstorage","version":"1.0.2","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.2","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"21f1ab68b6480d8edca31799a68be7f4c0dc124d","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.2.tgz","fileCount":4,"integrity":"sha512-fI5u3VZ53kMUvbXOCuQ9hf8NtJtAyj23ymBT/a07rAGd1Z1eiKTrILYigdhz15SRiKVITx2YCjBxE+4V73vQaQ==","signatures":[{"sig":"MEQCID4m/+gN2CTfnGLVS2dmfvHT7n6XmvDpFHL8AFstAxtbAiA4sSZQ0ut9XbbOO1KVwXHLerFv7WkaxxyqnaKuyFXXrA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4991},"main":"index.mjs","type":"module","gitHead":"87872c0dd22a28cddd4e564bf9f45006ca467314","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.2_1742219020778_0.44457869752418566","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@david-fernando/nodelocalstorage","version":"1.0.3","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.3","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"227684f073b30a9c5ab4b53e22c3f26974e0a0f7","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.3.tgz","fileCount":4,"integrity":"sha512-Co79lc1UX/UAcvC39RIM9IGrdNy3z88rm9NRihY+OJ0OTEr9apOyTcB66kRJyXgjh14Vl1Nl6CnigP6YNto2mw==","signatures":[{"sig":"MEUCIFK+1O3rkbFt7Tt/5gBGxxu1hnVwqlpFq19RPGskkKDLAiEAx2teaBOko0DpLfGnlvqI9oIrWaMox2MXBOr9GXib3JU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4998},"main":"index.mjs","type":"module","gitHead":"688b1e39d317a9091f2161fe3eae1079841b5b11","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.3_1742219066718_0.1353302004992385","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@david-fernando/nodelocalstorage","version":"1.0.4","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.4","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"5287f93be97cd09cd7353b22dd09030fd12df468","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.4.tgz","fileCount":4,"integrity":"sha512-Sx8lSyYyAPXhVeGZYQMlI6M0NrEEFolJvqOjIC2qPwOT071aB0afH2VJqT/OyQIaqpURhBrU8AhNrksGWzIZ0A==","signatures":[{"sig":"MEUCIQDeV2wdf0g77ZEvuwNHX3qzb3boIvGSavgVvjMHXz5agwIgTTl0DbmIzDq2kiCjDwnQh4YDnSlFOJxiTh/hWpeTX4U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4990},"main":"index.mjs","type":"module","gitHead":"27e9d6313d5a14931ab0a6110a2e5e266ebe7cc3","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.4_1742259330962_0.7462707891992173","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@david-fernando/nodelocalstorage","version":"1.0.5","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","_id":"@david-fernando/nodelocalstorage@1.0.5","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"homepage":"https://github.com/david-fernando/nodestorage","bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"dist":{"shasum":"c8e9f58704b84295660be2c8e3eee4751a8e703c","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.5.tgz","fileCount":4,"integrity":"sha512-3g3DrILkNEaB90BZMXgT5sWtTvBV8WleYJ/+exo1zPyTZhiMYxf9oHLvCq/kavgtaDq7G2focKWhk2JAdqnheg==","signatures":[{"sig":"MEYCIQD5r9SOk+uNEPNbQcW3gkHRUdxayAg/VOEdOZb6vh+CrgIhAPUspF79ZSzOZxsMp4w0XkhplC7LVLPF66eRbMvCEaqh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4969},"main":"index.js","gitHead":"d1b573a5942c036ffe0f4e4e7258136be97c3ed9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"repository":{"url":"git+https://github.com/david-fernando/nodestorage.git","type":"git","directory":"packages/name"},"_npmVersion":"10.8.2","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nodelocalstorage_1.0.5_1742406480154_0.26119287887398746","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@david-fernando/nodelocalstorage","version":"1.0.6","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/david-fernando/nodestorage.git","directory":"packages/name"},"bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"homepage":"https://github.com/david-fernando/nodestorage","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"author":{"name":"davidfernando"},"license":"ISC","description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","_id":"@david-fernando/nodelocalstorage@1.0.6","gitHead":"3de92264c06e91fbd0ff9b1bf841c2e452bdf969","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-oXYl1AAcb35bpIzLLtGsrYcUBXmVAgfmMgiRbt8cPJPjzMMA+tLLSquKK6klejbVXS0VNp5SDJtdz8e+Rwz1oQ==","shasum":"c24db916c5b5a092070af060b9752c73bdbb744f","tarball":"https://registry.npmjs.org/@david-fernando/nodelocalstorage/-/nodelocalstorage-1.0.6.tgz","fileCount":4,"unpackedSize":4976,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC74TuuDl4U6zeccjWi8//cdaXhQmH0iVm9uclrbrfF6AiBl/ScwA0YV/fUWX6I1l55lYtwIHQM//t4RSlg5ww1SDA=="}]},"_npmUser":{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"},"directories":{},"maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nodelocalstorage_1.0.6_1742478818428_0.5386910293675329"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-17T13:29:38.752Z","modified":"2025-03-20T13:53:38.873Z","1.0.0":"2025-03-17T13:29:39.056Z","1.0.1":"2025-03-17T13:32:24.849Z","1.0.2":"2025-03-17T13:43:40.959Z","1.0.3":"2025-03-17T13:44:26.890Z","1.0.4":"2025-03-18T00:55:31.138Z","1.0.5":"2025-03-19T17:48:00.359Z","1.0.6":"2025-03-20T13:53:38.690Z"},"bugs":{"url":"https://github.com/david-fernando/nodestorage/issues"},"author":{"name":"davidfernando"},"license":"ISC","homepage":"https://github.com/david-fernando/nodestorage","keywords":["localStorage","local Storage","nodeStorage","Node local storage","Node localStorage","storage","data","Node","NodeJS","armazenamento","armazenagem","armazenamento de dados","JS","JavaScript","Javascript"],"repository":{"type":"git","url":"git+https://github.com/david-fernando/nodestorage.git","directory":"packages/name"},"description":"A simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.","maintainers":[{"name":"david-fernando","email":"davidfernandodamata21@gmail.com"}],"readme":"# NodeStorage\n\nA simple Node.js library for local storage without external dependencies, similarly to the `localStorage` of the browsers.\n\n## 📦 Installation\n\nTo install, use one of the following commands\n```\nnpm install @david-fernando/nodelocalstorage\nor\nyarn add @david-fernando/nodelocalstorage\n```\n\n## 🚀 Usage\n\n### Importing the Module\n\nSince this library uses ES Modules, import it as follows:\n```javascript\nimport localStorage from '@david-fernando/nodelocalstorage';\n```\n\n### Available Methods\n\n- **`getItem(key)`** - Retrieves the value associated with the specified key.\n- **`setItem(key, value)`** - Stores a value under the specified key.\n- **`removeItem(key)`** - Deletes the specified key and its value.\n- **`key(index)`** - Retrieves the value stored under the key located at the specified index.\n- **`clear()`** - Deletes all keys and removes the JSON file.\n- **`print()`** - Logs all items to the console.\n- **`length`** (Property) - Returns the number of stored items.\n\n### Example Usage\n```javascript\nimport localStorage from '@david-fernando/nodelocalstorage';\n\nconst { setItem, getItem, removeItem, key, clear, print } = localStorage();\n\n// Setting items\nsetItem('username', 'David');\nsetItem('age', 28);\n\n// Retrieving items\nconsole.log(getItem('username')); // Output: David\n\n// Print all items\nprint(); // Output: { username: 'David', age: 28 }\n\n// Checking length\nconsole.log(localStorage().length); // Output: 2\n\n// Removing an item\nremoveItem('age');\n\n// Getting keys by index\nconsole.log(key(0)); // Output: David\n\n// Clearing all data\nclear();\n```\n\n## 📁 How Data is Stored\nData is saved in a file called `localStorage.json` in the root directory of this library\n\n## 🔒 Note\nThis library only works in Node.js environments, as it uses the `fs` module.\n\n## 📜 License\nThis project is licensed under the MIT License.","readmeFilename":"README.md"}