🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@stdlib/assert-is-regexp

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/assert-is-regexp

Test if a value is a regular expression.

0.2.2
latest
Source
npm
Version published
Maintainers
4
Created

What is @stdlib/assert-is-regexp?

@stdlib/assert-is-regexp is a utility package that provides functionality to check if a value is a regular expression object. This can be useful in various scenarios where type checking is necessary, especially when dealing with dynamic data or inputs.

What are @stdlib/assert-is-regexp's main functionalities?

Check if a value is a regular expression

This feature allows you to check if a given value is a regular expression. It returns true if the value is a RegExp object, and false otherwise.

const isRegExp = require('@stdlib/assert-is-regexp');

console.log(isRegExp(/abc/)); // true
console.log(isRegExp(new RegExp('abc'))); // true
console.log(isRegExp('abc')); // false

Other packages similar to @stdlib/assert-is-regexp

Keywords

stdlib

FAQs

Package last updated on 27 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts