# lukeed/klona

A tiny (240B to 501B) and fast utility to "deep clone" Objects, Arrays, Dates, RegExps, and more!

Repository: https://github.com/lukeed/klona
Canonical: https://ross.abutalabs.com/products/klona
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-04-10T00:50:17+00:00

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 76, release rhythm 8, longevity 100
- inputs: {"age_days": 2428, "days_push": 146, "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 1732, forks 48 (observed 2026-08-28T04:05:28.821632+00:00)

## What it is
klona is a tiny (240B–501B gzipped) JavaScript utility for deep cloning objects, arrays, dates, regular expressions, maps, sets, typed arrays, and more. It ships in multiple size-optimized modes so you only bundle the cloning capability you need.

## Use cases
- deep clone a nested object in JavaScript
- copy state without shared references in a reducer
- clone arrays and objects faster than structuredClone
- deep copy JSON data in a tiny bundle
- duplicate objects with Dates, RegExps, Maps, and Sets
- avoid shallow copy pitfalls with Object.assign

## When to choose
- you need a very small, fast, dependency-free deep clone utility
- you want tree-shakeable modes tailored to the data types you clone
- you target environments where structuredClone is unavailable or too slow

## When to avoid
- you need cloning of functions, class instances with private fields, or circular references
- structuredClone or your framework's built-in cloning already covers your needs
- you need serialization to strings rather than in-memory copies

## Facets
- artifact type: library
- maturity: stable
- function: serialization
- domain: developer-tools, web-development
- platform: browser, cross-platform
- tags: deep-clone, tiny-library, zero-dependency, immutable-copy, javascript, nodejs

## Member repositories
- lukeed/klona (main) score 57

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.821632+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:31:30.879539+00:00, confidence not recorded.
  - readme: https://github.com/lukeed/klona (fetched 2026-08-28T04:05:28.821632+00:00, sha c5f4b72b3ac1)
  - registry_npm: https://registry.npmjs.org/klona (fetched 2026-08-29T11:08:34.786271+00:00, sha 15def590daa2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
