{"id":15392976,"url":"https://github.com/pimbrouwers/persist","last_synced_at":"2025-03-27T23:42:37.808Z","repository":{"id":57322368,"uuid":"62009163","full_name":"pimbrouwers/persist","owner":"pimbrouwers","description":"Client-side local \u0026 session persistence.","archived":false,"fork":false,"pushed_at":"2017-08-10T19:56:06.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T01:44:37.595Z","etag":null,"topics":["javascript","localstorage","sessionstorage"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pimbrouwers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-26T21:28:54.000Z","updated_at":"2020-06-04T14:40:29.000Z","dependencies_parsed_at":"2022-08-25T22:41:42.787Z","dependency_job_id":null,"html_url":"https://github.com/pimbrouwers/persist","commit_stats":null,"previous_names":["pimbrouwers/persistjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimbrouwers%2Fpersist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimbrouwers%2Fpersist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimbrouwers%2Fpersist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimbrouwers%2Fpersist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pimbrouwers","download_url":"https://codeload.github.com/pimbrouwers/persist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944063,"owners_count":20697948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","localstorage","sessionstorage"],"created_at":"2024-10-01T15:16:59.815Z","updated_at":"2025-03-27T23:42:37.760Z","avatar_url":"https://github.com/pimbrouwers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PersistJS\nJavaScript Library to facilitate client-side persistence. Includes helpers for: local and session storage.\n\n## Getting Started\n\n### Install\n`npm i --save persistjs`\n\n### AMD Usage\n```javascript\ndefine(['../path/to/persist'], function(Persist){\n    //Local Storage    \n    Persist.Local.Set('someKey', { someValue: 1 });\n    Persist.Local.Read('someKey');\n    Persist.Local.ReadJSON('someKey');\n    Persist.Local.Remove('someKey');\n    Persist.Local.Push('someKey', { someValue: 1 });\n    \n    //Session Storage\n    Persist.Session.Set('someKey', { someValue: 1 });\n    Persist.Session.Read('someKey');\n    Persist.Session.ReadJSON('someKey');\n    Persist.Session.Remove('someKey');\n    Persist.Session.Push('someKey', { someValue: 1 });\n}); \n```\n\n### Non-AMD Usage (bound to root)\n```javascript\n//Local Storage\nPersistJS.Local.Set('someKey', { someValue: 1 });\nPersistJS.Local.Read('someKey');\nPersistJS.Local.ReadJSON('someKey');\nPersistJS.Local.Remove('someKey');\nPersistJS.Local.Push('someKey', { someValue: 1 });\n\n//Session Storage\nPersistJS.Session.Set('someKey', { someValue: 1 });\nPersistJS.Session.Read('someKey');\nPersistJS.Session.ReadJSON('someKey');\nPersistJS.Session.Remove('someKey');\nPersistJS.Session.Push('someKey', { someValue: 1 });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimbrouwers%2Fpersist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimbrouwers%2Fpersist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimbrouwers%2Fpersist/lists"}