Socket
Socket
Sign inDemoInstall

karma-sourcemap-loader

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-sourcemap-loader - npm Package Compare versions

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));

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc