better-match

1.0.3 • Public • Published

better-match

  • No need to remember to add g every time
  • returns an array of captures, making it usable in a functional manner
npm i better-match
betterMatch(
	/(\d):(\d)/,
	'1:4 5:6 2:3'
) // => [ [1, 4], [5, 6], [2, 3] ]

betterMatch(
	/(?:^|\s)([^\s]{2})/g,
	'lol butts'
) // => [ ['lo'], ['bu'] ]

License

WTFPL

Package Sidebar

Install

npm i better-match

Weekly Downloads

3

Version

1.0.3

License

WTFPL

Unpacked Size

1.55 kB

Total Files

4

Last publish

Collaborators

  • tehshrike