Socket
Socket
Sign inDemoInstall

source-map

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-map - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

CHANGELOG.md
# Change Log
## 0.4.1
* Fix accidentally defining a global variable. #170.
## 0.4.0

@@ -4,0 +8,0 @@

@@ -98,6 +98,21 @@ /* -*- Mode: js; js-indent-level: 2; -*- */

return recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare,
aBias || exports.GREATEST_LOWER_BOUND);
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
aCompare, aBias || exports.GREATEST_LOWER_BOUND);
if (index < 0) {
return -1;
}
// We have found either the exact element, or the next-closest element than
// the one we are searching for. However, there may be more than one such
// element. Make sure we always return the smallest of these.
while (index - 1 >= 0) {
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
break;
}
--index;
}
return index;
};
});

2

lib/source-map/source-map-consumer.js

@@ -355,3 +355,3 @@ /* -*- Mode: js; js-indent-level: 2; -*- */

var temp = {};
var mapping, str, values, end;
var mapping, str, values, end, value;

@@ -358,0 +358,0 @@ while (index < length) {

@@ -264,3 +264,3 @@ /* -*- Mode: js; js-indent-level: 2; -*- */

cmp = strcmp(mappingA.name, mappingB.name);
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp) {

@@ -275,3 +275,3 @@ return cmp;

return mappingA.generatedColumn - mappingB.generatedColumn;
return strcmp(mappingA.name, mappingB.name);
};

@@ -278,0 +278,0 @@ exports.compareByOriginalPositions = compareByOriginalPositions;

{
"name": "source-map",
"description": "Generates and consumes source maps",
"version": "0.4.0",
"version": "0.4.1",
"homepage": "https://github.com/mozilla/source-map",

@@ -6,0 +6,0 @@ "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",

@@ -86,2 +86,18 @@ /* -*- Mode: js; js-indent-level: 2; -*- */

exports['test multiple matches'] = function (assert, util) {
var needle = 5;
var haystack = [1, 1, 2, 5, 5, 5, 13, 21];
assert.equal(binarySearch.search(needle, haystack, numberCompare,
binarySearch.LEAST_UPPER_BOUND), 3);
};
exports['test multiple matches at the beginning'] = function (assert, util) {
var needle = 1;
var haystack = [1, 1, 2, 5, 5, 5, 13, 21];
assert.equal(binarySearch.search(needle, haystack, numberCompare,
binarySearch.LEAST_UPPER_BOUND), 0);
};
});
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