0.0.4 • Published 9 months ago

@elonehoo/regex-timer v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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}))
0.0.3

10 months ago

0.0.4

9 months ago

0.0.2

1 year ago

0.0.1

2 years ago