import {setRegExpCaseSensitivity} from '@augment-vir/common';
setRegExpCaseSensitivity(/abc/i, {caseSensitive: true}); // output is `/abc/`
setRegExpCaseSensitivity(/abc/, {caseSensitive: false}); // output is `/abc/i`
setRegExpCaseSensitivity('abc', {caseSensitive: true}); // output is `/abc/i`
Creates a new RegExp by adding or removing the case insensitivity flag
'i'
, based on the givencaseSensitive
input. The first input can also be a string and it will be converted into a RegExp.