UNPKG

grunto

Version:
79 lines (70 loc) 2.71 kB
// instrument by jscoverage, do not modifly this file (function (file, lines, conds, source) { var BASE; if (typeof global === 'object') { BASE = global; } else if (typeof window === 'object') { BASE = window; } else { throw new Error('[jscoverage] unknow ENV!'); } if (BASE._$jscoverage) { BASE._$jscmd(file, 'init', lines, conds, source); return; } var cov = {}; /** * jsc(file, 'init', lines, condtions) * jsc(file, 'line', lineNum) * jsc(file, 'cond', lineNum, expr, start, offset) */ function jscmd(file, type, line, express, start, offset) { var storage; switch (type) { case 'init': if(cov[file]){ storage = cov[file]; } else { storage = []; for (var i = 0; i < line.length; i ++) { storage[line[i]] = 0; } var condition = express; var source = start; storage.condition = condition; storage.source = source; } cov[file] = storage; break; case 'line': storage = cov[file]; storage[line] ++; break; case 'cond': storage = cov[file]; storage.condition[line] ++; return express; } } BASE._$jscoverage = cov; BASE._$jscmd = jscmd; jscmd(file, 'init', lines, conds, source); })('lib/utils.js', [1,3,5,12,6,7,9,13], {"6_21_2":0,"6_26_11":0,"7_21_2":0,"7_26_11":0}, ["'use strict';","","var path = require('path');","","exports.joinPaths = function (one, two) {","\tone = one == null ? '' : String(one);","\ttwo = two == null ? '' : String(two);","","\treturn path.join(one, two).replace(/\\\\/g, '/').replace(/\\/$/, '');","};","","exports.genUniqueTaskName = function () {","\treturn '_' + Number(Date.now() + String(Math.random()).replace(/\\./, '')).toString(36);","};",""]); _$jscmd("lib/utils.js", "line", 1); "use strict"; _$jscmd("lib/utils.js", "line", 3); var path = require("path"); _$jscmd("lib/utils.js", "line", 5); exports.joinPaths = function(one, two) { _$jscmd("lib/utils.js", "line", 6); one = one == null ? _$jscmd("lib/utils.js", "cond", "6_21_2", "") : _$jscmd("lib/utils.js", "cond", "6_26_11", String(one)); _$jscmd("lib/utils.js", "line", 7); two = two == null ? _$jscmd("lib/utils.js", "cond", "7_21_2", "") : _$jscmd("lib/utils.js", "cond", "7_26_11", String(two)); _$jscmd("lib/utils.js", "line", 9); return path.join(one, two).replace(/\\/g, "/").replace(/\/$/, ""); }; _$jscmd("lib/utils.js", "line", 12); exports.genUniqueTaskName = function() { _$jscmd("lib/utils.js", "line", 13); return "_" + Number(Date.now() + String(Math.random()).replace(/\./, "")).toString(36); };