{"id":21519541,"url":"https://github.com/jollyjerr/react-autosave","last_synced_at":"2025-09-08T08:32:00.645Z","repository":{"id":40309969,"uuid":"310150993","full_name":"jollyjerr/react-autosave","owner":"jollyjerr","description":"A lightweight solution for auto saving controlled form values","archived":false,"fork":false,"pushed_at":"2025-03-09T04:33:55.000Z","size":52301,"stargazers_count":71,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T14:18:29.404Z","etag":null,"topics":["autosave","forms","react"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-autosave","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/jollyjerr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2020-11-05T00:37:52.000Z","updated_at":"2025-07-10T10:57:53.000Z","dependencies_parsed_at":"2024-06-21T15:37:35.311Z","dependency_job_id":"b93499b9-8e37-401b-8cae-b50b0c281e57","html_url":"https://github.com/jollyjerr/react-autosave","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.5142857142857142,"last_synced_commit":"cc253953b3d1d3394ae225ad1b5e966b0450e0d4"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jollyjerr/react-autosave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jollyjerr%2Freact-autosave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jollyjerr%2Freact-autosave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jollyjerr%2Freact-autosave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jollyjerr%2Freact-autosave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jollyjerr","download_url":"https://codeload.github.com/jollyjerr/react-autosave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jollyjerr%2Freact-autosave/sbom","scorecard":{"id":529737,"data":{"date":"2025-08-11","repo":{"name":"github.com/jollyjerr/react-autosave","commit":"8dbe504d67076f0a971d19db4ca39d6f622a9206"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jollyjerr/react-autosave/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jollyjerr/react-autosave/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jollyjerr/react-autosave/ci.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/ci.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"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 1/30 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 19 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":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"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-20T05:24:50.964Z","repository_id":40309969,"created_at":"2025-08-20T05:24:50.964Z","updated_at":"2025-08-20T05:24:50.964Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274157659,"owners_count":25232420,"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-09-08T02:00:09.813Z","response_time":121,"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":["autosave","forms","react"],"created_at":"2024-11-24T00:57:55.993Z","updated_at":"2025-09-08T08:32:00.629Z","avatar_url":"https://github.com/jollyjerr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-autosave\n\n[![Tests](https://github.com/jollyjerr/react-autosave/actions/workflows/ci.yml/badge.svg)](https://github.com/jollyjerr/react-autosave/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/jollyjerr/react-autosave/branch/main/graph/badge.svg?token=K7C88VK5GE)](https://codecov.io/gh/jollyjerr/react-autosave)\n![npm](https://img.shields.io/npm/dm/react-autosave)\n![minified size](https://img.shields.io/bundlephobia/min/react-autosave?color=green)\n\n\u003e Auto save controlled form values as they are updated.\n\nreact-autosave is a lightweight solution for auto saving controlled form values.\nIt handles many edge cases and guarantees a good user experience.\n\n## Examples\n\n```tsx\nimport React from 'react';\nimport axios from 'axios';\n\nimport { Autosave, useAutosave } from 'react-autosave';\n\nconst updateBlog = (data) =\u003e axios.post('myapi/blog/123', { text: data });\n\n// Via hook\nconst EditBlogFormWithHook = () =\u003e {\n  const [blogText, setBlogText] = React.useState('hello world');\n  useAutosave({ data: blogText, onSave: updateBlog });\n  return (\n    \u003cdiv\u003e\n      \u003cinput\n        type=\"text\"\n        value={blogText}\n        onChange={(e) =\u003e setBlogText(e.target.value)}\n      /\u003e\n    \u003c/div\u003e\n  );\n};\n\n// Via component\nconst EditBlogForm = () =\u003e {\n  const [blogText, setBlogText] = React.useState('hello world');\n  return (\n    \u003cdiv\u003e\n      \u003cinput\n        type=\"text\"\n        value={blogText}\n        onChange={(e) =\u003e setBlogText(e.target.value)}\n      /\u003e\n      \u003cAutosave data={blogText} onSave={updateBlog} /\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n## Installation\n\n```sh\nyarn add react-autosave\n\n# or with npm...\nnpm i react-autosave\n```\n\n## Features\n\n1. Written in typescript.\n\n2. Lightweight and simple.\n\n3. No dependencies.\n\n## API\n\n| Prop                     |         Type         |                                                        Description |\n| ------------------------ | :------------------: | -----------------------------------------------------------------: |\n| data                     |        TData         |                         The controlled form value to be auto saved |\n| onSave                   | (data: TData) =\u003e any |                            The callback function to save your data |\n| interval (optional)      |        number        | The number of milliseconds between save attempts. Defaults to 2000 |\n| saveOnUnmount (optional) |       boolean        |        Defaults to true. Set to false to prevent saving on unmount |\n\n### Contributing\n\nIssues and PRs are more than welcome. Please clone the repo and setup your environment with:\n\n```sh\npnpm\n```\n\nThe test suite can be run with `pnpm test`\nBuid the library with `pnpm build`\nA demo page can be viewed with `pnpm build \u0026\u0026 pnpm dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjollyjerr%2Freact-autosave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjollyjerr%2Freact-autosave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjollyjerr%2Freact-autosave/lists"}