← All recipes
Moderne licensed

Replace deprecated Buffer.slice() with Buffer.subarray()

Recipe IDorg.openrewrite.node.migrate.buffer.replace-deprecated-sliceArtifact@openrewrite/recipes-nodejs

Replace deprecated buffer.slice() calls with buffer.subarray() for compatibility with Uint8Array.prototype.slice().

Single recipeDEP0158Proprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.node.migrate.buffer.replace-deprecated-slice

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs