klona

Tiny, fast deep-clone library for JavaScript with multiple flavors for different use cases. klona/full handles all JS types including Date, RegExp, Array, Map, Set, and typed arrays. klona/lite is the tiniest version for plain objects. klona/json uses JSON.parse/stringify for JSON-safe cloning. The 'lite' flavor is ~200 bytes. A modern, focused alternative to lodash.cloneDeep.

Evaluated Mar 06, 2026 (0d ago) v2.x
Homepage ↗ Repo ↗ Developer Tools clone deep-clone copy javascript performance klona
⚙ Agent Friendliness
65
/ 100
Can an agent use this?
🔒 Security
100
/ 100
Is it safe for agents?
⚡ Reliability
91
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
70
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
98
Secret Handling
100

MIT licensed. Zero dependencies. Local computation — no security concerns.

⚡ Reliability

Uptime/SLA
98
Version Stability
90
Breaking Changes
90
Error Recovery
85
AF Security Reliability

Best When

You're building a browser-side application and need a tiny, fast deep clone utility with minimal bundle impact.

Avoid When

You're in Node.js 17+ where structuredClone() is built-in, or you need circular reference support.

Use Cases

  • Deep clone JavaScript plain objects and arrays in agent state management pipelines
  • Create isolated copies of agent configuration objects before modification
  • Clone test data fixtures with full type fidelity including Date, Set, and Map support
  • Implement copy-on-write patterns in agent data pipelines with minimal bundle overhead
  • Replace lodash.cloneDeep in bundle-size-sensitive browser agent applications

Not For

  • Server-side Node.js where structuredClone() is available — built-in structuredClone is comprehensive and dependency-free
  • Cloning class instances — klona strips prototype methods; use a class-aware clone for domain objects
  • Circular references — klona does not handle circular references; use rfdc with circles:true option

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no authentication required. MIT licensed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Zero cost. Very small package — ~200 bytes for lite flavor.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Choose the right flavor: klona/lite for plain objects (smallest), klona/full for all JS types (Date, Set, Map), klona/json for JSON-safe data
  • Circular references are NOT supported — will cause infinite recursion; use rfdc({ circles: true }) or structuredClone for circular data
  • Prototype chain stripped — class instances lose methods after cloning; only own enumerable properties are cloned
  • In Node.js 17+, prefer built-in structuredClone(obj) — handles more types including ArrayBuffer, Error, and handles circular references
  • klona/full adds ~400 bytes over klona/lite — only use full when you actually have Date, Set, or Map in your data
  • ESM-only package — CommonJS require() won't work; ensure your bundler handles ESM

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for klona.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered