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.0 to 0.3.1

package.json~

18

index.js

@@ -43,13 +43,11 @@ var fs = require('fs');

var match = content.match(/#\s*sourceMappingURL=(.+)$/m);
if (match !== null && match.length == 2) {
var mapUrl = match[1];
if( /^data:application\/json/.test(mapUrl) ){
inlineMap(mapUrl);
} else {
fileMap(path.resolve(path.dirname(file.path), mapUrl));
}
var lastLine = content.split(new RegExp(require('os').EOL)).pop();
var match = lastLine.match(/^\/\/#\s*sourceMappingURL=(.+)$/);
var mapUrl = match && match[1];
if (!mapUrl) {
fileMap(file.patch + ".map");
} else if (/^data:application\/json/.test(mapUrl)) {
inlineMap(mapUrl);
} else {
fileMap(file.path + ".map");
fileMap(path.resolve(path.dirname(file.path), mapUrl));
}

@@ -56,0 +54,0 @@ };

{
"name": "karma-sourcemap-loader",
"version": "0.3.0",
"version": "0.3.1",
"description": "Karma plugin that locates and loads existing javascript source map files.",

@@ -5,0 +5,0 @@ "main": "index.js",

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