{"_id":"aio-storage","_rev":"7-8bb3bedb91c885ede62f24f5bf326494","name":"aio-storage","dist-tags":{"latest":"4.0.1"},"versions":{"1.0.0":{"name":"aio-storage","version":"1.0.0","author":"","license":"ISC","_id":"aio-storage@1.0.0","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"c721d4331ee6b7f14642aec1a8c154a38ba39398","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-1.0.0.tgz","fileCount":3,"integrity":"sha512-KgahZWarjIIgsEW7Jqoz0vI1AbohkiK/PB4kyIFcvKvoxKilAWvOn0JnNyAlexcLsSS1wFDg0Gc7LNYV3Ulwog==","signatures":[{"sig":"MEQCIEacTrSqNJzNL3QGcC4fZmkpLCKD6adq1drJBP98WC+WAiByWispCARdmDhXj8F+2H6j9aw7df02Rf5mrVUJkW/EtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJm5iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1lg//ZutFHKJx/1AXmV9ccNiRLg/IsjARk6sNGYQIKtUzqBbfyvhs\r\nSdfcvXGhPQSImKjTNz3UcQ7dLhV9u43MhQmCoCUdY61k69mW3LFVELnr2RUD\r\nwB5DPfMye5DVGG/tF0ewKpyZH6qEx1vU90Q333ZS0jvDQulu88W5LSyGyjnu\r\nbBjBAe3iN4th0QEdl1ZhX3RLjVqqLKdrTtciQsAJzkeaWcfc8q28XPv+UoV0\r\nrouN19MkVzqckaTtaCHbB98++5vG23gcylUchcYKQq4UDnh7XUxftNQ+Jv4j\r\na/v+Bia17DW+L6DwQtYtvHzTptAi8hJhcYYogQ1i6o6FzVJmF8KJdz/gA5w7\r\nD9GM0khZ9NOfLB9cehj0znq64AAn96OAuyECHXXp/ge6GkQxYq6RYPRAT2OR\r\nyGsQ/cnMPT7ZpBhbo9xwFpnGb769cdKqf1hA6i1gMC6n5rlFICHnv88FwBtn\r\noQs7PjKlrZR9cQ5bzz9nkj5IYaCt2QbFU/t0vnKv/Cjh4DkZyl2LOMXxGvZb\r\nokI0BFD6NrUsvsAslWxndT9iIogV8R+TnF+HKohyHyURzebAGn0xk+c/gDkU\r\n4JiRlyULcay8tI/i+hBSAbQPDLoCSyCCmXM02iPK8z1EK2PLz+OE8ybvajQy\r\nBSfHy9CM2LBULOfSXSIFVnih6DA7d5/G9yg=\r\n=+y6E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"78d08bee563a9127b2f9d4ea4a2b090c5a822765","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_1.0.0_1663463010367_0.7904784804262801","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"aio-storage","version":"1.0.1","author":"","license":"ISC","_id":"aio-storage@1.0.1","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"df50b7b1bf6f95d80f529adfdfa02e7a3e1a4946","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-1.0.1.tgz","fileCount":3,"integrity":"sha512-HhMHLcHWxC78tHgJTDNfIT79yw3mMG9gzwi51vZbCgFEUlZt4zPG9oYUHEXD6M1rH/unLLeE4OpfSLhgVUKjcw==","signatures":[{"sig":"MEUCIAIttq05w+a9XVoXHI935BBolA/rZZz6loJZVgQqMO3lAiEAx/H9ZmSQNuOhSxfL9vSZOvy9EHJkL3WGcunCmsBO/s0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWbVfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqcjg/+IUvRR/QPPnqz3GkUBIbQLJuRQFeF1nMZQb/3BiGDq6u0k5kA\r\nw4VQP2sDKKIk7wPlzIeuVqmUy5fW54QumO6N0I+um7inBuNSw+XeHKCiBMqs\r\n6zUf4p1uQ7Z/0UuJffDvAAr1z8QsI6vpee0AI9f4dpF7aJ7oRGq7qWdp2bGj\r\n3DjBbC33tqBZ0m55BiY5FqIRmEUql9zWUI1S2nCOQC6/eoqyE48ESXYdpQMv\r\nAjFy1HEX2k2C/2036v2b9jnxvUif2hpqoOjEqkjf1Jm/TlOVji83A5d3FOFk\r\npzpRd0zD1h6TTYtpzpehY/dCTa2zTp7jp/UC/FCBvXV8tXh9HG2yhkfMhVmB\r\nRiddhsGVIfHp4Dfl+EUizVwi0pU6bQjYdvgQxQl7ZenImoLGQ916lQBhmBA7\r\n9jL73NgqVxcwmfopFBtGVJezv5D6FRbpBhgd29TdvDfNkx/0YR70iy9kfVWq\r\nNNkEGjX/juO/Mq8+UumVDJD8C3D8KBYCsgKLHT8iecQ/5+wep/4IbNdOhkQZ\r\nsmYuVYXerCu8DiGWqRg582woL8nj3+fjpM0xAvFYVGnkl62ohGoaTyYq5Xpd\r\n/jVZn3bqtawbAjFSxUyJeIGZjzr6L90Z6siYUIkOyNSAmGwr3jXUbfScypWH\r\n9vFtDak+VDWuK5EJBCPf6vndvAw2U+3Ok5E=\r\n=hKzK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ec73a26a71494394b40fee1be83a9adde6dbba89","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_1.0.1_1666823518898_0.34070850671642106","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"aio-storage","version":"2.0.0","author":"","license":"ISC","_id":"aio-storage@2.0.0","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"7e6f69ccb9053a76abe055b6871a3a187f478501","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-2.0.0.tgz","fileCount":3,"integrity":"sha512-lzJnmZizSVS7IWeE/dXdOyFw7wOna1wCXcftEW15XLMvjzV0GFO/oNaA1yf8lEQPADFiGBgz3w0xl0Hw/HuZaw==","signatures":[{"sig":"MEUCIQCCvm7FynjoMn/PSn+FkkQmZvyB5T3/025yxAB/i+UUwAIgBHh6KlOIDEhAaIg6jssgdIUE0mWNc22eqqjqRufOjXw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGhmrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0rg/9EgVHL956PtIu4v6OxCHTFQuffDHxasz/pPJRTheeyfmjxg6/\r\nOOdXIy9P97BzOkAVP6Uq9MJ20aRg4BJShLUv3gn9JqcJ4vF6ygrhbKbqW1cg\r\nhB4jhRjX/Vyfj4ilsk/7AGtTT0nQ/RQbapRImsAB3GbHJsousvkCoB2afxfQ\r\nFwFcZgTf8bMB/itpGgYjqywlGj6xcUUnAGQrPdp4nbt6Rxi4ePOTbVHsKVq+\r\n/M+sPaJqwGTAyVJb0z8xNkor4+15rhRM/QTeH81EKdv+nBtGQnicUN18j5UC\r\nitDWmlJFfYyLkpN1TBXAh821CX2NeozlVck+1UWGyLA3VfuWR0Wr+hUiyMWx\r\n5w66NOlxGXV7YcPCOLsgT25YNXGc+7fPCQJsdhICW67DLecEW+vZtYQTwML9\r\nFjlDY1Q0emz41kI9+j6L760QJAFkIcSzbuI9feut3ddQ9A6E/YwO+e3Heg5W\r\nliy/fvsTLlc+DkHCvBAT8HCSDAhaMIVqK9NeNBi0CFxdXql2p3vt74YvQAh0\r\nqVPInSKY0GXwfhRvhRJImSbcNZFvCl3NFdAVqqSVNJz4IR5DFDX84zIz+x/U\r\npMAAowJuJRv/us0890/+Jxq3NVqO99cN+7ZpLs3ZIuVMRDt6koHHRW7JhOsi\r\ndveSkWLzbtkXvgZ0jNNOAL9enH+WQqZag3Q=\r\n=i3qv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"ec73a26a71494394b40fee1be83a9adde6dbba89","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_2.0.0_1679432107814_0.895936927504013","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"aio-storage","version":"3.0.0","author":"","license":"ISC","_id":"aio-storage@3.0.0","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"65e63c178ee8c67b85f507a85fe0cde2f806822a","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-3.0.0.tgz","fileCount":3,"integrity":"sha512-nymMbCp23wgXLF/QYOwZ7dMStQi2ngg9y+VkVWKMN3msNlN2E1X6X+aD8TIBSz0LHpvd9JdG/xdFIcq9bmntuQ==","signatures":[{"sig":"MEUCIQD/b0d/bwANbR8msd0sKxRyHKkeFmC5d3Yg6MyNrX5xeAIgWeSAdv66/T9+I6l8Bc/fFm3s8uS1ZF3yrDI04WQcx9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG3z5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrotw//R6qac4KDCk6giZcoDvFX3+JmllNQoZsb7s8OOwwHLwsQbIws\r\nV13rDMGpM1lRSl1Y8O2L3Yt9fNd4d6hBcgkAqAfJt3vNPSp/pWBJRXSRGubf\r\nFbw0Hdr6YWcvosaU+g7FgcQgwvOLgbnxwu/DM5koIUREFvRmt9IcKNWKd5qn\r\nukUt5Mcs9T7QHUKBkXIX322aLUTtpYdrWaYLZoGhd3dY/0xgp/xZAjXBiOXu\r\nOjww95h0Ha892J1ly0IlO/IHCrnG5bbQXYYe+GIXAWiil1lHp5QMS/iGo1Kv\r\nt7+N4QUBz48NmLjencgPQQVrM1fYeHnU0HQ6sbdHTxjg/EWtphzdS04MnGog\r\n0KFQpOciIgxWd/Q4CGMMKp3IgMZ+F8z5i8MTqQvUWRfHbh5u3HjaBtbrzd7O\r\nozfyTkMTeA1mTEQOTrVleNdWfROWJBXBrpjgnS/Jdvp/OF9OG4Tmiq5R5Ofc\r\nntq5ioBwk3uFllsKVXRxmbJeNyj53sIm8K+4A9RhbKbeYIYX88htmvH5HlfH\r\nCfww6dYki5B36NHBOhPXsvoYioLl+lyDlqlh6PccjgpnTTSnPTudeL8w88If\r\ncJ0ttSu2tDkxijYYr7hPAw//FQa0MgPXmbaiyrANUs/Gvdm0mVpIRGVGgugp\r\nTivvJ7jTeYv9zqUerfgjkeP47K/kUHqY+cs=\r\n=TRYE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"879f3c1a1a1bcbef588be9db9d36d085231dcd6e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_3.0.0_1679523065466_0.40714268513741825","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"aio-storage","version":"4.0.0","author":"","license":"ISC","_id":"aio-storage@4.0.0","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"eb6e26fa12f6a508c58d7f2b1043d54a85318deb","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-4.0.0.tgz","fileCount":3,"integrity":"sha512-LG61+Bxs/n+XJl4aROC98cBw+ON3tKbjIFOY+wDQXOJzolixjEz8DHdPVvze91/i2R8fKquMd24NF+9ILiB8FA==","signatures":[{"sig":"MEYCIQCjKisNSVsbIxKtLM/kYJpGb2P0SHfF3fepChQAxLKmhQIhAO8TZOOo/HZn6wboVWrXXK8z1ljhfQ0+5xuVDAWPZohU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8831},"main":"index.js","gitHead":"966885b2f93e72772deb17ef513efd9bbd0762ec","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_4.0.0_1699228756913_0.5014357469662376","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"aio-storage","version":"4.0.1","author":"","license":"ISC","_id":"aio-storage@4.0.1","maintainers":[{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"}],"homepage":"https://github.com/mohammadFeiz/aio-storage#readme","bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"dist":{"shasum":"0fd4ab29862c5157af3da974f818b69a6535467d","tarball":"https://registry.npmjs.org/aio-storage/-/aio-storage-4.0.1.tgz","fileCount":3,"integrity":"sha512-AzHJ1g0y+QAfo+Cn4OIKKnB56Y7g0Xv9xIXE3zlUtFQUpOl7DmCC9JI2gSpxhFqgaePUoDNqz1UcPzuJ+B7RPw==","signatures":[{"sig":"MEUCIGy5FUdOxwL3Og32eKuQAG+CCpgVwiTHmTidBbTBRwrnAiEAlKUlQ66SyZYUZrLTVjm14hZ6yh2HrbZTSYdOwMJUm2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9602},"main":"index.js","gitHead":"45e2dbc36daf40623805e9a814c51fd8bac45d8f","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mohamadfeiz","email":"feiz.ms@gmail.com"},"repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"_npmVersion":"6.14.17","description":"```javascript\r npm install aio-storage\r ```","directories":{},"_nodeVersion":"14.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aio-storage_4.0.1_1700129731283_0.42081457153421464","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-09-18T01:03:30.367Z","modified":"2025-12-12T10:50:43.435Z","1.0.0":"2022-09-18T01:03:30.541Z","1.0.1":"2022-10-26T22:31:59.066Z","2.0.0":"2023-03-21T20:55:07.957Z","3.0.0":"2023-03-22T22:11:05.637Z","4.0.0":"2023-11-05T23:59:17.085Z","4.0.1":"2023-11-16T10:15:31.461Z"},"bugs":{"url":"https://github.com/mohammadFeiz/aio-storage/issues"},"license":"ISC","homepage":"https://github.com/mohammadFeiz/aio-storage#readme","repository":{"url":"git+https://github.com/mohammadFeiz/aio-storage.git","type":"git"},"description":"```javascript\r npm install aio-storage\r ```","maintainers":[{"email":"feiz.ms@gmail.com","name":"aio-collection"}],"readme":"# aio-storage\r\n\r\n### read and write files by localStorage and local text files\r\n\r\n### install\r\n```javascript\r\nnpm install aio-storage\r\n```\r\n\r\n### usage\r\n##### first import AIOStorage class. then create an instance by a defined key. \r\n```javascript\r\nimport AIOStorage from 'aio-storage';\r\n\r\nlet Storage = new AIOStorage('my key');\r\n\r\n```\r\n\r\n### save\r\n##### for save a value in localStorage follow below:\r\n```javascript\r\nStorage.save({\r\n  name:'userInfo',\r\n  value:{\r\n    firstname:'john',\r\n    lastname:'doe'\r\n  }\r\n});\r\nStorage.save({name:'date',value:'2022/3/4'});\r\n```\r\n##### for save a value call instance.save by an object parameter contain: \r\n- ##### name : string ( after you can load this value by this name )\r\n- ##### value : any ( a value for save in local storage ) \r\n\r\n### load\r\n##### for load a value from localStorage follow below:\r\n\r\n```javascript\r\nlet userInfo = Storage.load({\r\n  name:'userInfo',\r\n  def:{}\r\n});\r\nlet date = Storage.load({\r\n  name:'date',\r\n  def:'2023/3/3',\r\n  time:60000\r\n});\r\nconsole.log(userInfo) //{name:'john',family:'doe'}\r\nconsole.log(date) //before 1 minute from save it date will be '2022/3/4' and after it date will be 2023/3/3\r\n```\r\n##### for load a value, call instance.load by an object parameter contain: \r\n- ##### name : string ( name of saved value )\r\n- ##### def : any ( if this name is not in storage, def value will save on it and load method will return this value )\r\n- ##### time : miliseconds number ( setting time is optional . for example if you set it 60000 , storage will load it for 1 minute and after it dont load it )\r\n\r\n##### if use def , then that is not required for save a value , because load method will save it if not exist\r\n\r\n### remove\r\n##### remove a value from storage by send its name\r\n```javascript\r\nStorage.remove({name:'date'});\r\n```\r\n### reset\r\n##### localStorage will reset and all values will be removed\r\n```javascript\r\nStorage.reset();\r\n```\r\n\r\n### getModel\r\n##### get storage model contain all saved values\r\n```javascript\r\nStorage.getModel();\r\n```\r\n### export \r\n##### download storage content as a text file. after you can import that. this is for save storage model on local file system and prevent miss it after clearing cache\r\n```javascript\r\nStorage.export();\r\n```\r\n### import \r\n##### read saved text file from export by input file and send it to import method for updating storage, also you can send a callback for call after it(important because import is not an async action). \r\n```javascript\r\nStorage.import({file,callback});\r\n```\r\n","readmeFilename":"README.md"}