1.1.2 • Published 3 years ago

is-boolean-object v1.1.2

Weekly downloads
3,311,287
License
MIT
Repository
github
Last release
3 years ago

is-boolean-object Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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

Example

var isBoolean = require('is-boolean-object');
var assert = 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(new RegExp('a', 'g')));
assert.notOk(isBoolean(new Date()));
assert.notOk(isBoolean(42));
assert.notOk(isBoolean(NaN));
assert.notOk(isBoolean(Infinity));

assert.ok(isBoolean(new Boolean(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 run npm test

enzymewhich-boxed-primitivearchetype-libraryeasy-select-rnvuedragdropuploadimages@phil8795/pecuniarius-apideneme323112@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_modafryxiconsprecise-jsonmutasi-bca@jttechnic/interpreter@saeon/quick-formreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsuncoded-connectwilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-nativequoc-testreact-native-slider-kf@infinitebrahmanuniverse/nolb-is-b@saaspe/componentsexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1932jawwy-sdkjawwy_gamification_release@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_samplereact-native-chenaardrop-menu-nav-bardskcoreneweditorjs_forkederikoalamerlocogonzales08es-react-bridgeelvyelviraepm-npm-tscenefti-galerienzyme-futuredfeuk-frontend-manualeasyplayer-mydynamics-contracts-xeditor.js-custom-multiple-selectedpayutestingblix_svelvetflaresssstyle-guide-maineslint-plugin-templewallet-testfaturohmanfawaterak-online-paymentfawatrak-online-paymentfernandotorest45ferlinanons23fmslfn-lib-exampleeslint-config-lucas-silbernageletdahsusahestehsusuevanutilsex-ikon-components-libraryjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwynextjs-storiestest_lib_module_aarzzzxxxyyy321123nayladanzahra@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdownfluent.adflow.reactnativesdkfluent.adflow.reactnativesdk-alphafbkocakfalcata-appfixed_form_builderexpo-renavigategalangpramono253galihariwanda29gaskeunlahcuy20gaskeunnnmamanggassefalsgassefals-2
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

9 years ago