@E18e/Is Array Buffer

/icons/calendar.svg

Last update

Aug 9, 2024

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

background illustrationGet Started Now