1.0.1 • Published 8 months ago

clone-stats-node22 v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

clone-stats

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

Usage

clone-stats

copy = require('clone-stats')(stat)

Returns a clone of the original fs.Stats instance (stat).

Monkey-patching other modules that depend on the original version

require('module-alias').addAlias('clone-stats', 'clone-stats-node22');

License

MIT. See LICENSE.md for details.

1.0.1

8 months ago

1.0.0

8 months ago