{"_id":"@briansalazar06/storage-test","_rev":"3-90261231e6d08979915d3e0ea357cf17","name":"@briansalazar06/storage-test","dist-tags":{"alpha":"2.0.0-alpha.0","latest":"3.0.0"},"versions":{"2.0.0-alpha.0":{"name":"@briansalazar06/storage-test","version":"2.0.0-alpha.0","keywords":["Storage","localStorage","sessionStorage"],"author":{"name":"sot"},"license":"ISC","_id":"@briansalazar06/storage-test@2.0.0-alpha.0","maintainers":[{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"}],"dist":{"shasum":"0324d030e909e5fbd52d9c6ca91422120b589b64","tarball":"https://registry.npmjs.org/@briansalazar06/storage-test/-/storage-test-2.0.0-alpha.0.tgz","fileCount":8,"integrity":"sha512-zxTC0fdMragVp0RvIOGHVTsmdQcNf7AweA2guHOmn4zbDcr96Svb+yur3VNfkFXppihpbBoDnz4lr/gi0CTbTw==","signatures":[{"sig":"MEUCIQDqpBiqxdR+IbOWKnNgR0ejdGqhBEZt7NzbJedx0baOwgIgEGcaVoLW7ak/lbTbyjrZ7XQyqrCPWYlyXEiPmUsHZZg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15173},"main":"dist/index","babel":{"extends":"../../babel.config.js"},"types":"dist/index","gitHead":"016f812910e504c177b9ef234791a1ce8c1bdb2e","private":false,"scripts":{"dev":"webpack --config ../../webpack.config.js --entry=./src/index.ts --watch","lint":"eslint src --fix","test":"jest --config ../../jest.config.js --testPathPattern='storage-test' --verbose","build":"npm run minify && npm run transpile","minify":"webpack --config ../../webpack.config.js --entry=./src/index.ts","transpile":"tsc --OutDir dist/js --project tsconfig.json","prepublish":"npm run test && npm run build","publish-alpha":"npm publish --tag alpha","test-coverage":"jest --config ../../jest.config.js --testPathPattern='storage-test' --coverage","upgrade-major":"npm version major","upgrade-minor":"npm version minor","upgrade-patch":"npm version patch","prepublishOnly":"if [[ $npm_config_tag != 'alpha' ]]; then echo 'Publishing is restricted to the alpha tag only. Please use `npm publish --tag alpha`.'; exit 1; fi","publish-latest":"npm publish","upgrade-premajor":"npm version premajor --preid alpha","upgrade-preminor":"npm version preminor --preid alpha","upgrade-prerelease":"npm version prerelease --preid alpha"},"_npmUser":{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"},"_npmVersion":"10.7.0","description":"Snippet to handle Local and Session Storage, with the ability to imitate the amplify storage structure.","directories":{},"_nodeVersion":"20.15.1","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/storage-test_2.0.0-alpha.0_1721596017191_0.062200889484612","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@briansalazar06/storage-test","version":"2.0.0","keywords":["Storage","localStorage","sessionStorage"],"author":{"name":"sot"},"license":"ISC","_id":"@briansalazar06/storage-test@2.0.0","maintainers":[{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"}],"dist":{"shasum":"a263fa7eccba8e1feb15e429245ffcaee8a175f9","tarball":"https://registry.npmjs.org/@briansalazar06/storage-test/-/storage-test-2.0.0.tgz","fileCount":8,"integrity":"sha512-OT/NsdFP5xMKmMaL4eJoAikyXyWKqyExPxFqH5OlLJZGU3M0ONc2/Uzd+E5/o+AEeu4LIwJkHc7cCnnJJWeLhQ==","signatures":[{"sig":"MEUCIB0Y3CqcTi9u3xUgTcu6/5NTUqVCAEleIynAWrLJDU6vAiEArKmVSllyuARnLW0cQtJeItx2/ZY4IMuXeucHb5HW9ZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15170},"main":"dist/index","babel":{"extends":"../../babel.config.js"},"types":"dist/index","gitHead":"016f812910e504c177b9ef234791a1ce8c1bdb2e","private":false,"scripts":{"dev":"webpack --config ../../webpack.config.js --entry=./src/index.ts --watch","lint":"eslint src --fix","test":"jest --config ../../jest.config.js --testPathPattern='storage-test' --verbose","build":"npm run minify && npm run transpile","minify":"webpack --config ../../webpack.config.js --entry=./src/index.ts","transpile":"tsc --OutDir dist/js --project tsconfig.json","prepublish":"npm run test && npm run build","publish-alpha":"npm publish --tag alpha","test-coverage":"jest --config ../../jest.config.js --testPathPattern='storage-test' --coverage","upgrade-major":"npm version major","upgrade-minor":"npm version minor","upgrade-patch":"npm version patch","prepublishOnly":"if [[ $npm_config_tag != 'alpha' ]]; then echo 'Publishing is restricted to the alpha tag only. Please use `npm publish --tag alpha`.'; exit 1; fi","publish-latest":"npm publish","upgrade-premajor":"npm version premajor --preid alpha","upgrade-preminor":"npm version preminor --preid alpha","upgrade-prerelease":"npm version prerelease --preid alpha"},"_npmUser":{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"},"_npmVersion":"10.8.2","description":"Snippet to handle Local and Session Storage, with the ability to imitate the amplify storage structure.","directories":{},"_nodeVersion":"20.17.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/storage-test_2.0.0_1726761867655_0.4429503353075155","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@briansalazar06/storage-test","version":"2.0.1","keywords":["Storage","localStorage","sessionStorage"],"author":{"name":"sot"},"license":"ISC","_id":"@briansalazar06/storage-test@2.0.1","maintainers":[{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"}],"dist":{"shasum":"bacd067c2ac4a5691b02be68f25820dc3aeebfc7","tarball":"https://registry.npmjs.org/@briansalazar06/storage-test/-/storage-test-2.0.1.tgz","fileCount":8,"integrity":"sha512-2a1jFNfIcRo/Q8naSP8T2jEYHEKy4jil6/986XlohjeE4zfwvgFAv4UaFaNdDwaMMWBQIYaTxV52pN8SxYc2MA==","signatures":[{"sig":"MEUCICUDTjxvY2FUUPkBRDioR50aMsS2LWoWHele438xfCzRAiEA/eMT+xL2ACfqo5Pocmlrd2ZeGwxVnSuSbto3lVk0hIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15170},"main":"dist/index","babel":{"extends":"../../babel.config.js"},"types":"dist/index","gitHead":"016f812910e504c177b9ef234791a1ce8c1bdb2e","private":false,"scripts":{"dev":"webpack --config ../../webpack.config.js --entry=./src/index.ts --watch","lint":"eslint src --fix","test":"jest --config ../../jest.config.js --testPathPattern='storage-test' --verbose","build":"npm run minify && npm run transpile","minify":"webpack --config ../../webpack.config.js --entry=./src/index.ts","transpile":"tsc --OutDir dist/js --project tsconfig.json","prepublish":"npm run test && npm run build","publish-alpha":"npm publish --tag alpha","test-coverage":"jest --config ../../jest.config.js --testPathPattern='storage-test' --coverage","upgrade-major":"npm version major","upgrade-minor":"npm version minor","upgrade-patch":"npm version patch","prepublishOnly":"if [[ $npm_config_tag != 'alpha' ]]; then echo 'Publishing is restricted to the alpha tag only. Please use `npm publish --tag alpha`.'; exit 1; fi","publish-latest":"npm publish","upgrade-premajor":"npm version premajor --preid alpha","upgrade-preminor":"npm version preminor --preid alpha","upgrade-prerelease":"npm version prerelease --preid alpha"},"_npmUser":{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"},"_npmVersion":"10.8.2","description":"Snippet to handle Local and Session Storage, with the ability to imitate the amplify storage structure.","directories":{},"_nodeVersion":"20.17.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/storage-test_2.0.1_1726778464168_0.045654991731165495","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@briansalazar06/storage-test","version":"3.0.0","private":false,"description":"Snippet to handle Local and Session Storage, with the ability to imitate the amplify storage structure.","main":"dist/index","types":"dist/index","babel":{"extends":"../../babel.config.js"},"scripts":{"dev":"webpack --config ../../webpack.config.js --entry=./src/index.ts --watch","transpile":"tsc --OutDir dist/js --project tsconfig.json","minify":"webpack --config ../../webpack.config.js --entry=./src/index.ts","build":"npm run minify && npm run transpile","lint":"eslint src --fix","test":"jest --config ../../jest.config.js --testPathPattern='storage-test' --verbose","test-coverage":"jest --config ../../jest.config.js --testPathPattern='storage-test' --coverage","prepublish":"npm run test && npm run build","upgrade-prerelease":"npm version prerelease --preid alpha","upgrade-preminor":"npm version preminor --preid alpha","upgrade-premajor":"npm version premajor --preid alpha","upgrade-patch":"npm version patch","upgrade-minor":"npm version minor","upgrade-major":"npm version major","publish-latest":"npm publish","publish-alpha":"npm publish --tag alpha","prepublishOnly":"if [[ $npm_config_tag != 'alpha' ]]; then echo 'Publishing is restricted to the alpha tag only. Please use `npm publish --tag alpha`.'; exit 1; fi"},"keywords":["Storage","localStorage","sessionStorage"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"sot"},"license":"ISC","gitHead":"016f812910e504c177b9ef234791a1ce8c1bdb2e","_id":"@briansalazar06/storage-test@3.0.0","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-3IM6K2zIDQOttvGQUawe4q9vgB91E+/gxn4+zf2+XlWivA10SzgfaNypJbG7GluAro2ssmLEabq5zqECyakqhA==","shasum":"8670f209ea11b53206c5eb5bbe9d6f33e56af29f","tarball":"https://registry.npmjs.org/@briansalazar06/storage-test/-/storage-test-3.0.0.tgz","fileCount":8,"unpackedSize":15170,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwsRA5di1q1Ru8tl5OvlBtPxWQtqv2EeBL9SsvARX80QIgbvaIwBoKig0zZmQB2DILHj733psKS503knMJJfh/o34="}]},"_npmUser":{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"},"directories":{},"maintainers":[{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/storage-test_3.0.0_1728161782581_0.38547335469295474"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-21T21:06:57.088Z","modified":"2024-10-05T20:56:22.998Z","2.0.0-alpha.0":"2024-07-21T21:06:57.418Z","2.0.0":"2024-09-19T16:04:27.838Z","2.0.1":"2024-09-19T20:41:04.348Z","3.0.0":"2024-10-05T20:56:22.800Z"},"author":{"name":"sot"},"license":"ISC","keywords":["Storage","localStorage","sessionStorage"],"description":"Snippet to handle Local and Session Storage, with the ability to imitate the amplify storage structure.","maintainers":[{"name":"briansalazar06","email":"bsalazarsanchez06@gmail.com"}],"readme":"# SOT Storage Module\nlibrary to handle how to access local and session storage, with the ability to imitate [amplifyjs](https://amplifyjs.com/api/store/) storage structure.\n\n# Quick Start\n\n## Installation\n\n### In sot_pages repo\n\n`npm run package-setup install @sot/storage <Page-Path>`\n\n### Regular repo\n\n`npm install @sot/storage`\n\n## Importing\n\n### ES Modules\n\n```js\nimport { Storage } from '@sot/storage/dist/js';\n```\n\n### Included Directly\nIf you want to use the library on a page that doesn't have a build environment, you can directly copy the index.js in the dist folder (you can change the name to `sot-storage.min.js`) file into the vendors folder on the page to use and import it in the HTML as:\n\n```html\n<script src=\"js/vendors/sot-storage.min.js\"></script>\n```\n\n## Usage\n\nPlease refer to the [documentation page](https://backstage.ltvops.com/docs/default/Component/sot_pages/sot-components/storage/) for the Storage on Backstage to learn more about the library.\n\n### Set:\n\n  1. Local Storage (Legacy):\n  ```js\n  Storage.local.set('yourKey', value);\n  ```\n\n  2. Local Storage (Non-Legacy):\n  ```js\n  Storage.local.set('yourKey', value, false);\n  ```\n\n  3. Session Storage:\n  ```js\n  Storage.session.set('yourKey', value);\n  ```\n\n### Get:\n\n  1. Local Storage (Legacy):\n  ```js\n  Storage.local.get('yourKey');\n  ```\n\n  2. Local Storage (Non-Legacy):\n  ```js\n  Storage.local.get('yourKey', false);\n  ```\n\n  3. Session Storage:\n  ```js\n  Storage.session.get('yourKey');\n  ```\n\n### Remove:\n\n  1. Local Storage (Legacy):\n  ```js\n  Storage.local.remove('yourKey');\n  ```\n\n  2. Local Storage (Non-Legacy):\n  ```js\n  Storage.local.remove('yourKey', false);\n  ```\n\n  3. Session Storage:\n  ```js\n  Storage.session.remove('yourKey');\n  ```\n\n### Clear\n\nUsually, you will only use this function at the beginning of a flow, for example on a `Landing` page. Be careful because this function removes everything from the local or session storage (from the domain where you're using it) so if you need to keep data for another process you should use `Storage.local.remove()` or `Storage.session.remove()` instead.\n\n  1. Local Storage:\n  ```js\n  Storage.local.clear();\n  ```\n\n  2. Session Storage:\n  ```js\n  Storage.session.clear();\n  ```\n\n# Contributing\nTo contribute, follow the instructions in the main sot_components readme at https://github.com/ltvco/sot_components.\n","readmeFilename":"readme.md"}