v2.0.0
Breaking
-
Migrated from
default
to named export: 11034e1ESM/TypeScript
- import klona from 'klona'; + import { klona } from 'klona';
CommonJS
- const klona = require('klona'); + const { klona } = require('klona');
Features
-
Added
klona/json
mode: 1762c15
Only supports JSON data types. -
Added
klona/lite
mode: 8cb217a
Supports JSON data types, Dates, RegExps, and custom classes. -
Added DataView, ArrayBuffer, and TypedArray support to
klona
main entry: 04c176b -
Added
klona/full
mode: 1a85948
Extendsklona
with support for Symbol properties and non-enumerable properties. -
Added native ESM support via
exports
mapping: 9ae0093
Allows for Node.jsimport
statements to work within native ESM resolvers.
Chores
- (test) Extract tests into reusable files for composition: 0e8b82b
- (test) Ensure each "mode" has full test coverage: a64c3fd, 58f4491, 0110463
- (test) Add class inheritance tests: 4fc79fd
- (bench): Rework benchmarks for multi-mode fixtures and validations: 46cc9ed
- (bench): Print benchmark results with explainer: 1a73cd8
- (readme): Update documentation with
Modes
comparison section: 3949d6b, d8a44da - (meta) Enable GitHub Sponsors button 🙇: 5cb032c