{"id":17958114,"url":"https://github.com/toinane/electron-light-storage","last_synced_at":"2026-01-21T15:33:40.811Z","repository":{"id":34257247,"uuid":"173956243","full_name":"Toinane/electron-light-storage","owner":"Toinane","description":"A lightweight Electron storage package","archived":false,"fork":false,"pushed_at":"2023-04-30T14:29:03.000Z","size":264,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T22:05:24.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Toinane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T13:55:14.000Z","updated_at":"2022-04-29T18:15:00.000Z","dependencies_parsed_at":"2024-10-29T11:32:12.755Z","dependency_job_id":null,"html_url":"https://github.com/Toinane/electron-light-storage","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"8c2811f5128c25e264f177466fc070cc2df651d6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toinane%2Felectron-light-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toinane%2Felectron-light-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toinane%2Felectron-light-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toinane%2Felectron-light-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Toinane","download_url":"https://codeload.github.com/Toinane/electron-light-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247827839,"owners_count":21002965,"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":[],"created_at":"2024-10-29T10:58:51.048Z","updated_at":"2026-01-21T15:33:40.806Z","avatar_url":"https://github.com/Toinane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-light-storage\n\n\u003e Lightweight Electron storage package\n\nYou probably need to save data for your Electron application. But you don't want a package that's too elaborate. That's good because I needed a small package with no dependency to allow me that, this is the purpose of this package!\n\n[![NPM](https://nodei.co/npm/electron-light-storage.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/electron-light-storage/)\n\n[![npm version](https://badge.fury.io/js/electron-light-storage.svg)](https://badge.fury.io/js/electron-light-storage)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Toinane/electron-light-storage)\n[![issues](https://img.shields.io/github/issues/Toinane/electron-light-storage.svg)](https://github.com/Toinane/electron-light-storage)\n[![forks](https://img.shields.io/github/forks/Toinane/electron-light-storage.svg)](https://github.com/Toinane/electron-light-storage)\n[![stars](https://img.shields.io/github/stars/Toinane/electron-light-storage.svg)](https://github.com/Toinane/electron-light-storage)\n\n## Installation\n\n`yarn add electron-light-storage`\n\n## Usage\n\n```javascript\nconst Storage = require('electron-light-storage');\nconst store = new Storage();\n\n// Set storage\nstore.set({ say: 'hi Github!' });\n\n// Get storage\nstore.get();\n//=\u003e { 'say': 'hi Github!' }\n\n// Get storage from name\nstore.get('say');\n//=\u003e 'hi Github!'\n\n// Set API just update the previous store with a deep merge, use reset API to remove all\nstore.set({ user: 'Toinane' });\n//=\u003e { 'say': 'hi Github!', 'user': 'Toinane' }\n\n// Reset storage (this API delete the file \u0026 create new storage file)\nstore.reset();\n//=\u003e {}\n```\n\nthis API is useful for minimal storage like this configuration object\n\n```json\n{\n    \"settings\": {\n        \"theme\": \"dark\",\n        \"tabIndent\": 4\n    },\n    \"user\": {\n        \"name\": \"Toinane\",\n        \"lastLogin\": 1577983073\n    }\n}\n```\n\n## API\n\n### storage.set(data: Object): Object\n\nYou have to pass only Object in this method.\n\n### storage.get(): Object\n\nIt will return you the Object saved.\n\n### storage.reset(): Boolean\n\nIt will return a boolean wich is properly reset.\n\n## Licence\n\nMIT @Toinane\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoinane%2Felectron-light-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoinane%2Felectron-light-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoinane%2Felectron-light-storage/lists"}