is-array-buffer Codemod
Introduction
This codemod removes the dependency on the is-array-buffer
package by replacing its usage with the built-in instanceof
operator. This change reduces unnecessary dependencies, simplifying the codebase and potentially improving performance.
Before
import isArrayBuffer from 'is-array-buffer';const checkBuffer = (data) => {return isArrayBuffer(data);};
After
const checkBuffer = (data) => {return (data instanceof ArrayBuffer);};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community