From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/tslint/lib/utils.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'node_modules/tslint/lib/utils.js') diff --git a/node_modules/tslint/lib/utils.js b/node_modules/tslint/lib/utils.js index 04dbd1496..2bd5c8ca2 100644 --- a/node_modules/tslint/lib/utils.js +++ b/node_modules/tslint/lib/utils.js @@ -72,9 +72,7 @@ function dedent(strings) { for (var _i = 1; _i < arguments.length; _i++) { values[_i - 1] = arguments[_i]; } - var fullString = strings.reduce(function (accumulator, str, i) { - return "" + accumulator + values[i - 1] + str; - }); + var fullString = strings.reduce(function (accumulator, str, i) { return "" + accumulator + values[i - 1] + str; }); // match all leading spaces/tabs at the start of each line var match = fullString.match(/^[ \t]*(?=\S)/gm); if (match === null) { @@ -149,9 +147,8 @@ exports.find = find; /** Returns an array that is the concatenation of all output arrays. */ function flatMap(inputs, getOutputs) { var out = []; - for (var _i = 0, inputs_2 = inputs; _i < inputs_2.length; _i++) { - var input = inputs_2[_i]; - out.push.apply(out, getOutputs(input)); + for (var i = 0; i < inputs.length; i++) { + out.push.apply(out, getOutputs(inputs[i], i)); } return out; } @@ -159,8 +156,8 @@ exports.flatMap = flatMap; /** Returns an array of all outputs that are not `undefined`. */ function mapDefined(inputs, getOutput) { var out = []; - for (var _i = 0, inputs_3 = inputs; _i < inputs_3.length; _i++) { - var input = inputs_3[_i]; + for (var _i = 0, inputs_2 = inputs; _i < inputs_2.length; _i++) { + var input = inputs_2[_i]; var output = getOutput(input); if (output !== undefined) { out.push(output); @@ -214,3 +211,8 @@ function detectBufferEncoding(buffer, length) { return "utf8"; } exports.detectBufferEncoding = detectBufferEncoding; +// converts Windows normalized paths (with backwards slash `\`) to paths used by TypeScript (with forward slash `/`) +function denormalizeWinPath(path) { + return path.replace(/\\/g, "/"); +} +exports.denormalizeWinPath = denormalizeWinPath; -- cgit v1.2.3