🐊Putout plugin adds ability to convert typeof to is type
npm install @putout/plugin-convert-typeof-to-is-type[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-typeof-to-is-type.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-typeof-to-is-type "npm"
> The typeof operator returns a string indicating the type of the unevaluated operand.
>
> (c) MDN
🐊Putout plugin adds ability to convert typeof to is type. Merged to @putout/plugin-types.
```
npm i @putout/plugin-convert-typeof-to-is-type -D
`json`
{
"rules": {
"convert-typeof-to-is-type": "on"
}
}
`js`
if (typeof a === 'boolean')
return x;
`js
const isBool = (a) => typeof a === 'boolean';
if (isBool(a))
return x;
``
MIT