# guillaumepotier/Garlic.js

Automatically persist your forms' text and select field values locally, until the form is submitted.

Repository: https://github.com/guillaumepotier/Garlic.js
Canonical: https://ross.abutalabs.com/products/garlicjs
Homepage: http://garlicjs.org/
Language: CSS
License: NOASSERTION
License Family: other
Last push: 2021-11-03T09:57:46+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5044, "days_push": 1764, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2340, forks 174 (observed 2026-08-28T04:06:38.605950+00:00)

## What it is
Garlic.js is a JavaScript library that automatically persists form text and select field values in localStorage until the form is submitted, preventing data loss from accidental tab or browser closure. It works declaratively via data attributes with no JavaScript code required.

## Use cases
- prevent users from losing form data when they close the browser tab
- auto-save form drafts locally before submission
- persist form field values across page reloads
- handle conflicts between localStorage values and server-retrieved defaults
- set expiration times for persisted form data

## When to choose
- you want zero-configuration form persistence with just a data attribute
- users fill long forms and risk losing data on accidental navigation
- you need a lightweight, framework-agnostic jQuery plugin

## When to avoid
- you need persistence for radio inputs or textareas with known conflicts
- you use a modern framework with built-in state management
- you need server-side draft synchronization

## Facets
- artifact type: library
- maturity: maintenance
- function: form-handling, state-management
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: forms, localstorage, persistence, jquery-plugin, draft-saving, javascript

## Member repositories
- guillaumepotier/Garlic.js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:38.605950+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:37:25.278857+00:00, confidence not recorded.
  - readme: https://github.com/guillaumepotier/Garlic.js (fetched 2026-08-28T04:06:38.605950+00:00, sha 2bd776c1d07c)
  - homepage: http://garlicjs.org/ (fetched 2026-08-29T10:17:53.345312+00:00, sha 1ad4fe52e051)
- Data as of 2026-08-30T08:39:29.467469+00:00.
