index.js
function make_regex(tokens) {
	var str = tokens.reduce(function (res, token, index) {
			var is_last = (index == (tokens.length - 1));
			var before_multi = (index === (tokens.length - 2)) && (last(tokens).type == "multi");
			return res + ((is_last || before_multi) ? token.last : token.piece);
		},
		"");
	return new RegExp("^" + str + "$");
}
function make_regex(tokens) {
	var str = tokens.reduce(function (res, token, index) {
			var is_last = (index == (tokens.length - 1));
			var before_multi = (index === (tokens.length - 2)) && (last(tokens).type == "multi");
			return res + ((is_last || before_multi) ? token.last : token.piece);
		},
		"");
	return new RegExp("^" + str + "$");
}
function make_regex ( tokens ) { var str = tokens . reduce ( function ( res , token , index ) { var is_last = ( index == ( tokens . length - 1 ) ) ; var before_multi = ( index === ( tokens . length - 2 ) ) && ( last ( tokens ) . type == "multi" ) ; return res + ( ( is_last || before_multi ) ? token . last : token . piece ) ; } , "" ) ; return new RegExp ( "^" + str + "$" ) ; }
Generates the RegExp object from the tokens
Generates the RegExp object from the tokens