Check if a Regular Expression
The value to check
import { isRegExp } from '@aws-lambda-powertools/commons/typeUtils';const value = /^foo.+$/;if (isRegExp(value)) { // value is a Regular Expression} Copy
import { isRegExp } from '@aws-lambda-powertools/commons/typeUtils';const value = /^foo.+$/;if (isRegExp(value)) { // value is a Regular Expression}
Check if a Regular Expression