Safely clone node's
fs.Stats
instances without
losing their class methods, i.e. stat.isDirectory()
and co.
This is a fork of hughsk/clone-stats but adapted to work on Node v22+ without a deprecation warning
Returns a clone of the original fs.Stats
instance (stat
).
MIT. See LICENSE.md for details.