@elonehoo/regex-timer
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

regex-timer

Make a regular expression time out if it takes too long to execute

Install

#npm
npm install @elonehoo/regex-timer
# yarn
yarn add @elonehoo/regex-timer
#pnpm
pnpm install @elonehoo/regex-timer

Usage

import {isMatch} from '@elonehoo/regex-timer'

console.log(isMatch(/\d+/, getUserInput(), {timeout: 1000}))

Readme

Keywords

Package Sidebar

Install

npm i @elonehoo/regex-timer

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

7.76 kB

Total Files

6

Last publish

Collaborators

  • elonehoo