karma-sourcemap-loader
Advanced tools
Comparing version 0.3.5 to 0.3.6
10
index.js
@@ -14,8 +14,6 @@ var fs = require('fs'); | ||
function inlineMap(inlineData){ | ||
var data; | ||
var b64Match = inlineData.match(/^data:.+\/(.+);base64,(.*)$/); | ||
if (b64Match !== null && b64Match.length == 3) { | ||
if (/^;base64,/.test(inlineData)) { | ||
// base64-encoded JSON string | ||
log.debug('base64-encoded source map for', file.originalPath); | ||
var buffer = new Buffer(b64Match[2], 'base64'); | ||
var buffer = new Buffer(inlineData.slice(';base64,'.length), 'base64'); | ||
sourceMapData(buffer.toString()); | ||
@@ -25,3 +23,3 @@ } else { | ||
log.debug('raw inline source map for', file.originalPath); | ||
sourceMapData(decodeURIComponent(inlineData.slice('data:application/json'.length))); | ||
sourceMapData(decodeURIComponent(inlineData)); | ||
} | ||
@@ -56,3 +54,3 @@ } | ||
} else if (/^data:application\/json/.test(mapUrl)) { | ||
inlineMap(mapUrl); | ||
inlineMap(mapUrl.slice('data:application/json'.length)); | ||
} else { | ||
@@ -59,0 +57,0 @@ fileMap(path.resolve(path.dirname(file.path), mapUrl)); |
{ | ||
"name": "karma-sourcemap-loader", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "Karma plugin that locates and loads existing javascript source map files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25971
55