lukeed / klona

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work with `Object.create`

alexander-akait opened this issue · comments

Reproducible repo:

// Works with `clone-deep` too
const clone = require('clone');
const { klona } = require('klona/full');

const obj = Object.create({
  method() {
    return 'foo';
  },
});

console.log(clone(obj).method());
console.log(klona(obj).method());

Sorry for the delay on this – thanks for reporting!