@E18e/Typed Array Buffer

/icons/calendar.svg

Last update

Aug 9, 2024

Typed Array Buffer Codemod

Introduction

This codemod replaces instances of the typed-array-buffer npm module with built-in JavaScript functionalities. Specifically, it transforms calls to typed-array-buffer into the corresponding buffer property of typed arrays, thereby reducing the number of dependencies and enhancing the performance of the codebase.

Before

import getBuffer from 'typed-array-buffer';
const buffer = getBuffer(myTypedArray);

After

const buffer = myTypedArray.buffer;

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now