{"id":20578816,"url":"https://github.com/hydrocarbons/secure-json","last_synced_at":"2026-04-07T16:31:08.028Z","repository":{"id":139598352,"uuid":"165364683","full_name":"HydroCarbons/secure-json","owner":"HydroCarbons","description":"JSON storage library to securely persist json data on disk","archived":false,"fork":false,"pushed_at":"2019-01-14T02:19:44.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T11:44:04.296Z","etag":null,"topics":["2019","adf","database","encrypted-data","hydrocarbons","inmemory","json","localstorage","nodejs","persistence","persistent-storage","secure","secure-json","simple"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HydroCarbons.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-01-12T08:26:47.000Z","updated_at":"2019-01-14T14:22:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"43493d6e-f455-407a-940d-3de5cab89a86","html_url":"https://github.com/HydroCarbons/secure-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HydroCarbons/secure-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydroCarbons%2Fsecure-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydroCarbons%2Fsecure-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydroCarbons%2Fsecure-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydroCarbons%2Fsecure-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HydroCarbons","download_url":"https://codeload.github.com/HydroCarbons/secure-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydroCarbons%2Fsecure-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["2019","adf","database","encrypted-data","hydrocarbons","inmemory","json","localstorage","nodejs","persistence","persistent-storage","secure","secure-json","simple"],"created_at":"2024-11-16T06:14:40.341Z","updated_at":"2026-04-07T16:31:07.993Z","avatar_url":"https://github.com/HydroCarbons.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Secure-JSON Icon](https://raw.githubusercontent.com/HydroCarbons/secure-json/master/secure-json-256.png)\n\n## Travis CI Status\n[![Build Status](https://travis-ci.com/HydroCarbons/secure-json.svg?branch=master)](https://travis-ci.com/HydroCarbons/secure-json)\n[![Coverage Status](https://coveralls.io/repos/github/HydroCarbons/secure-json/badge.svg?branch=master)](https://coveralls.io/github/HydroCarbons/secure-json?branch=master)\n\n# Secure JSON\n- **Secure JSON** JSON storage library to securely persist JSON data on disk. **Cipher** is configured to use **AES-256-CBC** with initialization vector.\n- There are two types of storage schema: _inmemory_ or _disk_\n  - **inmemory**: Store items are not persisted on disk and are not encrypted.\n  - **disk**: Store items are persisted on disk and can be encrypted.\n\n## Usage\n\n### Install\n```javascript\nnpm install secure-json --save\n```\n\n### Require\n```javascript\nconst SecureJStore = require(\"secure-json\");\n```\n### Create an instance of SecureJStore\n```javascript\nvar instance = new SecureJStore();\n```\n\n### Initialize instance with options\n```javascript\n\nvar options = {\n    store: \u003cPath to SecureJStore directory\u003e,\n    dbType: \u003cSpecify \"inmemory\" or \"disk\"\u003e,\n    password: \u003cSpecify password to encrypt the SecureJStore\u003e\n  };\n\ninstance.init(options);\n```\n\n### Create an instance of SecureJStore\n```javascript\nvar instance = new SecureJStore();\n```\n\n### Storing an item\n```javascript\ninstance.setItem(\"key1\", \"value1\");\n```\n\n### Retrieving an item\n```javascript\nlet value = instance.getItem(\"key1\");\n```\n\n### Removing an item\n```javascript\nlet value = instance.removeItem(\"key1\");\n```\n\n### Retrieving all keys\n```javascript\nlet keys = instance.keys();\n```\n\n### Retrieving all values\n```javascript\nlet values = instance.values();\n```\n\n### Retrieving all entries of (key, value) pairs\n```javascript\nlet items = instance.entries();\n```\n\n### Retrieving all entries with for...of loop\n```javascript\nfor(let item of instance ) { ... }\n```\n\n### Retrieving all entries with forEach loop\n```javascript\ninstance.forEach( (x) =\u003e { ... });\n```\n\n### Archiving instance\n```javascript\ninstance.archive();\n```\n\n## Library Usage/Test\n### Install\n` npm install `\n\n### Test\n` npm run test `\n\n### Coverage\n` npm run coverage`\n\nOR\n\n` istanbul cover ./test/test.js `\n\nCheck coverage folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydrocarbons%2Fsecure-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhydrocarbons%2Fsecure-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydrocarbons%2Fsecure-json/lists"}