build/modelscript.umd.js
function(tokens) {
            	if(typeof tokens === "string") {
            		tokens = [tokens];
            	}
                    var results = [];
            	var rule_count = rules$3.length;
            	var num_tokens = tokens.length;
                    var i, token, r, rule;
                
                    for (i = 0; i < num_tokens; i++) {
                        token = tokens[i];
                        // Check the conversion table
                        if (conversionTable[token.toLowerCase()]) {
                            results = results.concat(conversionTable[token.toLowerCase()].split(/\W+/));
                        }
                        
                        // Apply the rules
                        else {
                            var matched = false;
                            for ( r = 0; r < rule_count; r++) {
                                rule = rules$3[r];
                                if (token.match(rule.regex)) {
                                    results = results.concat(token.replace(rule.regex, rule.output).split(/\W+/));
                                    matched = true;
                                    break;
                                }
                            }
                            if (!matched) {
                                results.push(token);
                            }
                        }
                    }

            	return results;
            }
function(tokens) {
            	if(typeof tokens === "string") {
            		tokens = [tokens];
            	}
                    var results = [];
            	var rule_count = rules$3.length;
            	var num_tokens = tokens.length;
                    var i, token, r, rule;
                
                    for (i = 0; i < num_tokens; i++) {
                        token = tokens[i];
                        // Check the conversion table
                        if (conversionTable[token.toLowerCase()]) {
                            results = results.concat(conversionTable[token.toLowerCase()].split(/\W+/));
                        }
                        
                        // Apply the rules
                        else {
                            var matched = false;
                            for ( r = 0; r < rule_count; r++) {
                                rule = rules$3[r];
                                if (token.match(rule.regex)) {
                                    results = results.concat(token.replace(rule.regex, rule.output).split(/\W+/));
                                    matched = true;
                                    break;
                                }
                            }
                            if (!matched) {
                                results.push(token);
                            }
                        }
                    }

            	return results;
            }
function ( tokens ) { if ( typeof tokens === "string" ) { tokens = [ tokens ] ; } var results = [ ] ; var rule_count = rules$3 . length ; var num_tokens = tokens . length ; var i , token , r , rule ; for ( i = 0 ; i < num_tokens ; i ++ ) { token = tokens [ i ] ; // Check the conversion table if ( conversionTable [ token . toLowerCase ( ) ] ) { results = results . concat ( conversionTable [ token . toLowerCase ( ) ] . split ( / \W+ / ) ) ; } // Apply the rules else { var matched = false ; for ( r = 0 ; r < rule_count ; r ++ ) { rule = rules$3 [ r ] ; if ( token . match ( rule . regex ) ) { results = results . concat ( token . replace ( rule . regex , rule . output ) . split ( / \W+ / ) ) ; matched = true ; break ; } } if ( ! matched ) { results . push ( token ) ; } } } return results ; }
Accepts a list of tokens to expand.
Accepts a list of tokens to expand .