1.1.4 • Published 3 years ago

is-regex v1.1.4

Weekly downloads
22,978,438
License
MIT
Repository
github
Last release
3 years ago

is-regex Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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

Example

var isRegex = require('is-regex');
var assert = require('assert');

assert.notOk(isRegex(undefined));
assert.notOk(isRegex(null));
assert.notOk(isRegex(false));
assert.notOk(isRegex(true));
assert.notOk(isRegex(42));
assert.notOk(isRegex('foo'));
assert.notOk(isRegex(function () {}));
assert.notOk(isRegex([]));
assert.notOk(isRegex({}));

assert.ok(isRegex(/a/g));
assert.ok(isRegex(new RegExp('a', 'g')));

Tests

Simply clone the repo, npm install, and run npm test

es-abstractdeep-equalairbnb-prop-typesenzyme@huyhpham/rn-linearchetype-librarycomponennentteasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagepipihomespecify-importsbabel-specify-imports@icanpm/api-master@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-icons@almeidaa/ms@storybook/telejsonreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatemytreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apideneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_modafryxiconsprecise-jsonmutasi-bca@jttechnic/interpreter@l1nyanm1ng/react-picture-viewer@saeon/quick-formcthpb-plugin-social@olivervorasai/sliderreact-native-printer-brothersreact-native-shekhar-bridge-testasterjscogoportutilsuncoded-connectlevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29wilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-native@respondea/cordova-plugin-v-inappbrowserquoc-testreact-native-slider-kf@infinitebrahmanuniverse/nolb-is-rcclibyarntest@saaspe/componentsexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1934jawwy-sdkjawwy_gamification_release@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_samplereact-native-chenaarreact-native-responsive-sizedfeuk-frontend-manualpayutestingblix_svelvetflaresssstyle-guide-mainfmslfn-lib-examplejawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwynextjs-stories
1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

7 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

10 years ago

0.0.0

10 years ago