lukeed / klona

A tiny (240B to 501B) and fast utility to "deep clone" Objects, Arrays, Dates, RegExps, and more!
MIT License
1.62k stars 43 forks source link

doesn't work with `Object.create` #23

Closed alexander-akait closed 4 years ago

alexander-akait commented 4 years ago

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());
lukeed commented 4 years ago

Sorry for the delay on this – thanks for reporting!