Nnodejs

nodejs/fs-truncate-fd-deprecation

Handle DEP0081 via transforming `truncate` to `ftruncateSync` when using a file descriptor.

transformationmigration
Public
0 downloads
1 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

DEP0081: fs.truncate() using a file descriptor

This recipe transforms the usage of fs.truncate() to fs.ftruncateSync() when a file descriptor is used.

See DEP0081.

Example

Before:

js

After:

js

Ready to contribute?

Build your own codemod and share it with the community.