delimiter-finder

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i delimiter-finder

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

2.42 kB

Total Files

5

Last publish

Collaborators

  • surfingpikachu