# hughsk/flat

:steam_locomotive: Flatten/unflatten nested Javascript objects

Repository: https://github.com/hughsk/flat
Canonical: https://ross.abutalabs.com/products/hughsk-flat
Language: JavaScript
License: BSD-3-Clause
License Family: permissive
Last push: 2026-03-19T17:45:04+00:00

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

## Adoption (not part of the score)
Stars 1816, forks 197 (observed 2026-08-28T04:05:40.001685+00:00)

## What it is
A small JavaScript library that flattens nested objects into single-level objects with delimited keys and reversibly unflattens them back. It supports custom delimiters, array preservation, depth limits, and key transformation.

## Use cases
- flatten nested javascript objects
- convert nested  to flat key-value pairs
- unflatten delimited keys back into nested objects
- prepare nested config objects for environment variables
- preserve arrays while flattening objects
- limit flattening depth of deeply nested data

## When to choose
- you need reversible flattening of nested JS objects in Node.js or the browser
- you want configurable delimiters, array safety, and max depth options
- you need a tiny, well-established utility with no dependencies

## When to avoid
- you need to flatten deeply nested structures into other formats like CSV or tables
- you are working outside the JavaScript ecosystem
- you need schema-aware or streaming transformation of very large datasets

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, files
- platform: -
- tags: flatten, unflatten, nested-objects, object-manipulation, nodejs, javascript

## Member repositories
- hughsk/flat (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:40.001685+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-30T03:20:35.889273+00:00, confidence not recorded.
  - readme: https://github.com/hughsk/flat (fetched 2026-08-28T04:05:40.001685+00:00, sha a6ef7de8de5f)
  - registry_npm: https://registry.npmjs.org/flat (fetched 2026-08-29T10:59:22.790019+00:00, sha b0630ddaaacf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
