delimiter-finder
v1.1.0
Published
a simple utility to find words inside delimiters
Downloads
2
Maintainers
Readme
delimiter-finder
a utility to find words inside delimiters.
usage
create a new object with an array of delimiters.
use .find()
with a string as the input. it will output an array of matches for each delimiter specified.
const DelimiterFinder = require("delimiter-finder")
const delim = new DelimiterFinder(["$", "%"])
let matches = delim.find("hello $world$, how are you %today%")
console.log(matches)
/*
{
'$': [ 'world' ],
'%': [ 'today' ]
}
*/