Skip to content

ryanfarber/delimiter-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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' ] 
	}
*/

About

a utility to find words inside delimiters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published