All files / mframejs/utils template.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                  29x 226x 226x 226x 4x     226x    
 
 
/**
 * Helper if using tobermory.es6-string-html vscode extension
 *
 * @export
 * @param {...any[]} args
 * @returns {string}
 */
export function template(...args: any[]): string {
    let result = '<template>' + args[0][0];
    const inserts = [].slice.call(args, 1);
    for (let i = 0; i < inserts.length; ++i) {
        result += inserts[i] + args[0][i + 1];
    }
 
    return result + '</template>';
}