@E18e/Is Boolean Object

1.0.5Last update Aug 9, 2024
by@e18e

is-boolean-object Codemod

Introduction

This codemod replaces the usage of the is-boolean-object package with the native Object.prototype.toString.call method. By utilizing a built-in ES feature, the codemod reduces dependency on external packages, leading to a lighter codebase and potentially improved performance.

Before

import isBooleanObject from 'is-boolean-object';
const result = isBooleanObject(value);
if (result) {
// Do something
}

After

const result = Object.prototype.toString.call(value) === '[object Boolean]';
if (result) {
// Do something
}

Build custom codemods

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

background illustrationGet Started Now