{"id":15631395,"url":"https://github.com/batuhanw/haf","last_synced_at":"2025-10-07T13:13:36.111Z","repository":{"id":40749229,"uuid":"331778366","full_name":"BatuhanW/haf","owner":"BatuhanW","description":"A fully typed 🔒, cross-platform, persistent 💾 config ⚙️ solution for your NodeJS projects with a great developer experience!","archived":false,"fork":false,"pushed_at":"2024-06-16T17:40:31.000Z","size":1334,"stargazers_count":190,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T16:49:38.121Z","etag":null,"topics":["app","cli","config","node","nodejs","store","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/BatuhanW.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":"2021-01-21T23:03:59.000Z","updated_at":"2025-07-25T01:35:10.000Z","dependencies_parsed_at":"2024-06-17T06:01:11.241Z","dependency_job_id":"3ed385ef-cc2c-4be4-9e58-6fec1a6c0414","html_url":"https://github.com/BatuhanW/haf","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.3548387096774194,"last_synced_commit":"85a8e69d54b10bdcca8892b42caecbf488dfadfd"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/BatuhanW/haf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanW%2Fhaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanW%2Fhaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanW%2Fhaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanW%2Fhaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BatuhanW","download_url":"https://codeload.github.com/BatuhanW/haf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanW%2Fhaf/sbom","scorecard":{"id":20515,"data":{"date":"2025-08-11","repo":{"name":"github.com/BatuhanW/haf","commit":"3704d198e02051fc3f70c4756dbb3f8e3cf020b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/BatuhanW/haf/release.yml/main?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   4 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T16:42:01.178Z","repository_id":40749229,"created_at":"2025-08-14T16:42:01.179Z","updated_at":"2025-08-14T16:42:01.179Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278779948,"owners_count":26044474,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["app","cli","config","node","nodejs","store","typescript"],"created_at":"2024-10-03T10:40:16.465Z","updated_at":"2025-10-07T13:13:36.076Z","avatar_url":"https://github.com/BatuhanW.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 🔒 Haf 🦺 ✏️\n\n[![npm version](https://img.shields.io/npm/v/@batuhanw/haf.svg)](https://www.npmjs.com/package/@batuhanw/haf)\n![CI](https://github.com/BatuhanW/haf/workflows/main/badge.svg)\n[![Known Vulnerabilities](https://snyk.io/test/github/BatuhanW/haf/badge.svg?targetFile=package.json)](https://snyk.io/test/github/BatuhanW/haf?targetFile=package.json)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4315aa36678fe4181b77/maintainability)](https://codeclimate.com/github/BatuhanW/haf/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/4315aa36678fe4181b77/test_coverage)](https://codeclimate.com/github/BatuhanW/haf/test_coverage)\n\nHaf is a fully typed 🔒, cross-platform, persistent 💾 JSON storage ⚙️ solution for your NodeJS projects with a great developer experience!\n\n- ✏️ Auto-completed dot-notation suggestions as you type when you try to get()/set()/delete()/reset() data from the store.\n- ✅ The type of the value you get() from the store is correctly inferred. So you always know what you'll get().\n- ❌ Non-nullable values aren't suggested on delete(). Trying to delete() a non-nullable field will throw a type error.\n\n\u003e [Go to gifs section to see it in action!](./README.md#Gifs)\n\n## Installation\n\n```\nnpm i @batuhanw/haf\n\nOR\n\nyarn add @batuhanw/haf\n```\n\n## 🏃 Getting Started\n\n### 1. Define Your Schema\n\n```typescript\ninterface DogSchema {\n  name: string;\n  age: number;\n  toys: string[];\n  vaccines: { name: string; date: string; nextDate?: string }[];\n  appearance: {\n    eyeColor: string;\n    hairColor: {\n      primary: string;\n      secondary?: string;\n      otherColors: string[];\n    };\n  };\n  sterilizedAt?: string;\n  hasPuppies: boolean;\n}\n```\n\n### 2. Initiate Haf\n\n```typescript\nimport Haf from '@batuhanw/haf';\n\nconst haf = new Haf\u003cDogSchema\u003e({\n  name: 'myDog',\n  defaultSchema: {\n    name: 'Pop',\n    age: 2,\n    toys: ['socks', 'toilet paper'],\n    vaccines: [\n      { name: 'rabbies', date: '2020-01-01' },\n      { name: 'parasite', date: '2020-01-01', nextDate: '2020-01-03' },\n    ],\n    appearance: {\n      eyeColor: 'brown',\n      hairColor: {\n        primary: 'white',\n        secondary: undefined,\n        otherColors: ['black'],\n      },\n    },\n    sterilizedAt: undefined,\n    hasPuppies: false,\n  },\n});\n```\n\n### 3. Enjoy\n\n#### Get\n\n```typescript\n  const name = haf.get('name') // string\n  const age = haf.get('age') // number\n  const hasPuppies = haf.get('hasPuppies') // boolean\n  const vaccines = haf.get('vaccines') // { name: string; date: string; nextDate?: string }[]\n  const hairColor: haf.get('appearance.haircolor') // { primary: string; secondary?: string, otherColors: string[] }\n  const secondaryHairColor: haf.get('appearance.hairColor.secondary') // string | undefined\n\n  const invalid = haf.get('non-existent') // type error\n```\n\n#### Set\n\n```typescript\nhaf.set('name', 'Pop');\nhaf.set('appearance.hairColor', { primary: 'white' });\nhaf.set('appearance.hairColor.secondary', 'brown');\nhaf.set('appearance.hairColor.secondary', undefined);\nhaf.set('appearance.hairColor.otherColors', ['black']); // This will overwrite existing array\n\nhaf.set('name', 1); // type error\nhaf.set('toys', [1, 2]); // type error\nhaf.set('appearance.haircolor', { primary: 1 }); //type error\nhaf.set('appearance.hairColor.primary', 1); // type error\nhaf.set('appearance.haircolor', { notExist: 'white' }); //type error\n```\n\n#### Append\n\nAppends given values to the existing array\n\n```typescript\nhaf.get('toys'); // ['socks', 'toilet paper']\n\nhaf.append('toys', 'human hand', 'bone');\n\nhaf.get('toys'); // ['socks', 'toilet paper', 'human hand', 'bone']\n```\n\n#### Delete\n\n```typescript\nhaf.delete('sterilizedAt');\nhaf.delete('appearance.hairColor.secondary');\n\nhaf.delete('name'); // type error\nhaf.delete('appearance.hairColor.primary'); // type error\n```\n\n### Gifs\n\n#### Get\n\n![](https://github.com/BatuhanW/Haf/blob/main/get.gif)\n\n#### Set\n\n![](https://github.com/BatuhanW/Haf/blob/main/set.gif)\n\n#### Delete\n\n![](https://github.com/BatuhanW/Haf/blob/main/delete.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatuhanw%2Fhaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatuhanw%2Fhaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatuhanw%2Fhaf/lists"}