Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sourcemap-validator

Package Overview
Dependencies
Maintainers
2
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 1.0.7 to 1.1.0

tests/fixtures/valid/Babel/router.js.map

14

index.js

@@ -34,8 +34,10 @@ var validate

assert.ok(mapping.originalColumn!=null, 'missing original column, mapping: ' + prettyMapping);
assert.ok(mapping.originalLine!=null, 'missing original line, mapping: ' + prettyMapping);
assert.ok(mapping.originalColumn >= 0, 'original column must be greater or equal to zero, mapping: ' + prettyMapping);
assert.ok(mapping.originalLine >= 0, 'original line must be greater or equal to zero, mapping: ' + prettyMapping);
assert.notEqual(mapping.source, null, 'source is missing');
// If the source is null, the original location data has been explicitly
// omitted from the map to clear the mapped state of a line.
if (typeof mapping.source === "string") {
assert.ok(mapping.originalColumn!=null, 'missing original column, mapping: ' + prettyMapping);
assert.ok(mapping.originalLine!=null, 'missing original line, mapping: ' + prettyMapping);
assert.ok(mapping.originalColumn >= 0, 'original column must be greater or equal to zero, mapping: ' + prettyMapping);
assert.ok(mapping.originalLine >= 0, 'original line must be greater or equal to zero, mapping: ' + prettyMapping);
}
};

@@ -42,0 +44,0 @@

@@ -21,3 +21,3 @@ {

],
"version": "1.0.7",
"version": "1.1.0",
"repository": {

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

@@ -95,2 +95,11 @@ var validate = require('..')

tests['Valid Babel map should not throw'] = function () {
var babelDir = path.join(validDir, 'Babel')
, map = fs.readFileSync(path.join(babelDir, 'router.js.map')).toString();
assert.doesNotThrow(function () {
validate(null, map);
}, 'Valid Minifyified inline sourcemap and inline sourceContent should not throw');
};
module.exports = tests;
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