rfdc (Really Fast Deep Clone)

The fastest deep cloning library for JavaScript plain objects. 2-6x faster than lodash.cloneDeep and structuredClone for most object shapes. Zero dependencies. Supports circular references (with circular option), all primitive types, Dates, Arrays, and RegExp. Not designed for complex class instances — pure data object cloning.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools deep-clone clone copy performance fast rfdc object
⚙ Agent Friendliness
64
/ 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
82
Error Messages
70
Auth Simplicity
100
Rate Limits
100

🔒 Security

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

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

⚡ Reliability

Uptime/SLA
98
Version Stability
95
Breaking Changes
95
Error Recovery
75
AF Security Reliability

Best When

You need maximum performance deep cloning of plain data objects (JSON-serializable structures with Dates) where structuredClone performance matters.

Avoid When

Your objects contain class instances, Maps, Sets, Symbols, or circular references by default — rfdc has limitations with these types.

Use Cases

  • Deep clone state objects in agent pipelines where performance-critical cloning is needed without mutation risk
  • Create isolated copies of configuration objects in agent middleware before modification
  • Clone large JSON API response objects before transformation in agent data processing pipelines
  • Implement fast copy-on-write patterns in agent state management where structuredClone overhead is measurable
  • Deep copy test fixtures and data structures in agent unit tests with minimal overhead

Not For

  • Cloning class instances with prototype methods — rfdc clones plain data only; use a class-aware clone for instances
  • Circular reference detection by default — must pass { proto: false, circles: true } option for circular structures
  • Map, Set, Symbol, or WeakMap/WeakRef types — rfdc handles plain objects, arrays, Date, and RegExp only

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. Zero dependencies.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Circular references cause infinite recursion/stack overflow by default — must opt in: const clone = rfdc({ circles: true }) — forget this and crash on circular data
  • rfdc is a factory function — must call rfdc() first to get the clone function: const clone = rfdc(); const copy = clone(obj) — not a direct rfdc(obj) call
  • Does NOT clone Map, Set, Symbol, WeakMap — these types are copied by reference, not cloned; use structuredClone for these types
  • Class instances with prototype methods lose their prototype chain — cloned object is a plain object, not an instance: new Date() clones correctly but custom classes lose methods
  • Performance difference vs structuredClone only matters for frequent cloning — measure before optimizing; structuredClone is built-in and handles more types
  • proto option (default: false): { proto: true } copies prototype properties — rarely needed for data cloning; leave false for standard use

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for rfdc (Really Fast Deep Clone).

$99

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

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