This codemod updates removed Deno function calls in Deno v2 to their new equivalents from the standard library It also automatically adds the necessary import statements from the appropriate modules.
Before
function example() {const buffer = new Deno.Buffer();Deno.copy(source, destination);}
After
import { Buffer } from "jsr:@std/io/buffer";import { copy } from "jsr:@std/io/copy";function example() {const buffer = new Buffer();copy(source, destination);}
The following Deno functions are replaced:
Deno.Buffer
→Buffer
Deno.copy
→copy
Deno.iter
→iterateReader
Deno.iterSync
→iterateReaderSync
Deno.writeAllSync
→writeAllSync
Deno.writeAll
→writeAll
Deno.readAllSync
→readAllSync
Deno.readAll
→readAll
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community