Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

License

NotificationsYou must be signed in to change notification settings

inspect-js/is-boolean-object

github actionscoveragedependency statusdev dependency statusLicenseDownloads

npm badge

Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

varisBoolean=require('is-boolean-object');varassert=require('assert');assert.notOk(isBoolean(undefined));assert.notOk(isBoolean(null));assert.notOk(isBoolean('foo'));assert.notOk(isBoolean(function(){}));assert.notOk(isBoolean([]));assert.notOk(isBoolean({}));assert.notOk(isBoolean(/a/g));assert.notOk(isBoolean(newRegExp('a','g')));assert.notOk(isBoolean(newDate()));assert.notOk(isBoolean(42));assert.notOk(isBoolean(NaN));assert.notOk(isBoolean(Infinity));assert.ok(isBoolean(newBoolean(42)));assert.ok(isBoolean(false));assert.ok(isBoolean(Object(false)));assert.ok(isBoolean(true));assert.ok(isBoolean(Object(true)));

Tests

Simply clone the repo,npm install, and runnpm test

About

Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp