Skip to content

@longmo-utils/common / isBoolean

Function: isBoolean()

ts
function isBoolean(arg): boolean;

是否是布尔值

Parameters

ParameterTypeDescription
argany参数

Returns

boolean

true|false

Example

ts
isBoolean(123) // false
isBoolean(Boolean('1')) // true
isBoolean(true) // true

Released under the MIT License.