clone-stats

Safely clone node's fs.Stats instances without losing their class methods

Usage no npm install needed!

<script type="module">
  import cloneStats from 'https://cdn.skypack.dev/clone-stats';
</script>

README

clone-stats Flattr this!experimental

Safely clone node's fs.Stats instances without losing their class methods, i.e. stat.isDirectory() and co.

Usage

clone-stats

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

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

License

MIT. See LICENSE.md for details.