0.1.0 • Published 6 years ago

regextra v0.1.0

Weekly downloads
5
License
-
Repository
-
Last release
6 years ago

README

Wraps an object around regular expressions, allowing you to call map, forEach and reduce to handle the results of applying the regular expression to a string.

const regextra = require('regextra');

re = regextra(/[0-9]+/g);
re.match('123 456').forEach(console.info);
re.match('123 456').map(([match]) => parseInt(match));
re.match('123 456').reduce(…)