Registry
E

e18e/@e18e/data-view-byte-offset

No description available

e18e31 executions

  • Legacy
  • e18e
  • module-replacement
Connect a repo
npx codemod @e18e/data-view-byte-offset

Data View Byte Offset Codemod

Introduction

This codemod replaces the usage of the data-view-byte-offset npm module with a direct utilization of the built-in DataView feature in JavaScript. It eliminates the unnecessary dependency, reduces bundle size, and leverages native functionality for improved performance.

Before

javascript
import { byteOffset } from 'data-view-byte-offset';

const view = new DataView(buffer);
const offset = byteOffset(view, index);

After

javascript
const view = new DataView(buffer);
const offset = view.byteOffset(index);

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.