SlowBuffer to Buffer.allocUnsafeSlow Codemod
This codemod migrates deprecated SlowBuffer usage to Buffer.allocUnsafeSlow() to handle Node.js DEP0030.
What it does
This codemod transforms:
SlowBufferconstructor calls toBuffer.allocUnsafeSlow()- Direct
SlowBuffercalls toBuffer.allocUnsafeSlow() - Import/require statements be synced with new function
Example
diff- import { SlowBuffer } from "buffer"; + import { Buffer } from "buffer"; - const buf = new SlowBuffer(1024); + const buf = Buffer.allocUnsafeSlow(1024);