You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sourcemap-validator

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sourcemap-validator - npm Package Compare versions

Comparing version

to
1.0.3

12

index.js

@@ -50,7 +50,7 @@ var validate

try {
var marker = '//@ sourceMappingURL=data:application/json;base64,'
, offset = min.indexOf(marker);
var re = /\s*\/\/(?:@|#) sourceMappingURL=data:application\/json;base64,(\S*)$/m
, map = min.match(re);
map = (new Buffer(min.substring(offset + marker.length), 'base64')).toString();
min = min.substring(0, offset);
map = (new Buffer(map[1], 'base64')).toString();
min = min.replace(re, '');
}

@@ -63,3 +63,3 @@ catch (e) {

try {
consumer = new SMConsumer(map)
consumer = new SMConsumer(map);
}

@@ -74,3 +74,3 @@ catch (e) {

srcs[src] = content;
})
});

@@ -77,0 +77,0 @@ each(srcs, function (src, file) {

@@ -14,3 +14,3 @@ {

],
"version": "1.0.2",
"version": "1.0.3",
"repository": {

@@ -17,0 +17,0 @@ "type": "git",