all files / lib/RouterRoute/ Lang.js

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                  25× 25×               106×                     21×      
"use strict";
 
Object.defineProperty(exports, "__esModule", {
    value: true
});
let RouterRouteLang = class RouterRouteLang {
    /**
     * @param {RegExp} regExp
     * @param {RouteRouteLangUrlGenerator} urlGenerator
    */
    constructor(regExp, urlGenerator) {
        this.regExp = regExp;
        this.urlGenerator = urlGenerator;
    }
 
    /**
     * @param {string} input
     * @return {Array}
    */
    match(input) {
        return input.match(this.regExp);
    }
 
    /**
     * Url generator
     *
     * @param {object} args
     * @returns {string}
     * @throws Error
    */
    url(args) {
        return this.urlGenerator.generate(args);
    }
};
exports.default = RouterRouteLang;
//# sourceMappingURL=Lang.js.map