unjs/defu
Some data may be outdated — see provenance labels.
🌊 Assign default properties recursively observed · 2026-10-02
Health v2 · maintenance only
88/100
- Activity 97
- Release rhythm 71
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-22. Adoption (stars, forks) is never an input.
- gap_med: 2.5
- age_days: 2813
- days_rel: 197
- days_push: 20
- n_releases_24m: 3
Adoption not part of the score
1363 stars · 51 forks observed · 2026-10-02
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A tiny, fast TypeScript/JavaScript utility for recursively assigning default properties to objects without mutating inputs. It supports custom merging strategies and function-based default value manipulation.
Use cases
- merge default options with user-provided config in a library
- recursively fill missing nested object properties
- create a custom deep merge strategy like summing numbers
- apply functions to transform default values during merge
- merge arrays and objects without mutating the originals
When to choose
- you need lightweight recursive defaults assignment for JS/TS objects
- you want immutable merging with customizable strategies
- you're building a library or tool that accepts user options with sensible defaults
When to avoid
- you need full deep-merge with array concatenation semantics by default
- you're working outside the JavaScript/TypeScript ecosystem
- you need schema validation alongside merging
Facets
library · maturity stable
serialization developer-tools developer-tools web-development browser cross-platform defaults deep-merge options-merging typescript unjs javascript nodejs
2 sources
- readme: https://github.com/unjs/defu · fetched 2026-10-02 · dca847b70b10
- registry_npm: https://registry.npmjs.org/defu · fetched 2026-08-29 · 00e2df2ecb97
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| unjs/defu | main | 88 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem