Comparing version 0.0.4 to 0.0.5
@@ -1,4 +0,12 @@ | ||
var assert = require('assert'); | ||
(function(){ | ||
var TreeBase = require('./treebase'); | ||
if(typeof module !== 'undefined' && module.exports) { | ||
// CommonJS | ||
var assert = require('assert'); | ||
var TreeBase = require('./treebase'); | ||
} | ||
else { | ||
// browser | ||
var TreeBase = bintrees.TreeBase; | ||
} | ||
@@ -63,3 +71,3 @@ function Node(data) { | ||
return false; | ||
dir = this._comparator(node.data, data) < 0; | ||
@@ -123,2 +131,12 @@ | ||
module.exports = BinTree; | ||
if(typeof module !== 'undefined' && module.exports) { | ||
// CommonJS | ||
module.exports = BinTree; | ||
} | ||
else { | ||
// browser | ||
window.bintrees = window.bintrees || {}; | ||
window.bintrees.BinTree = BinTree; | ||
} | ||
})(); |
@@ -1,4 +0,12 @@ | ||
var assert = require('assert'); | ||
(function(){ | ||
var TreeBase = require('./treebase'); | ||
if(typeof module !== 'undefined' && module.exports) { | ||
// CommonJS | ||
var assert = require('assert'); | ||
var TreeBase = require('./treebase'); | ||
} | ||
else { | ||
// browser | ||
var TreeBase = bintrees.TreeBase; | ||
} | ||
@@ -89,3 +97,3 @@ function Node(data) { | ||
break; | ||
last = dir; | ||
@@ -140,3 +148,3 @@ dir = cmp < 0; | ||
found = node; | ||
// push the red node down | ||
@@ -220,3 +228,3 @@ if(!is_red(node) && !is_red(node.get_child(dir))) { | ||
var rn = root.right; | ||
// red violation | ||
@@ -245,2 +253,12 @@ if(is_red(root)) { | ||
module.exports = RBTree; | ||
if(typeof module !== 'undefined' && module.exports) { | ||
// CommonJS | ||
module.exports = RBTree; | ||
} | ||
else { | ||
// browser | ||
window.bintrees = window.bintrees || {}; | ||
window.bintrees.RBTree = RBTree; | ||
} | ||
})(); |
@@ -0,1 +1,3 @@ | ||
(function(){ | ||
function TreeBase() {} | ||
@@ -155,2 +157,12 @@ | ||
module.exports = TreeBase; | ||
if(typeof module !== 'undefined' && module.exports) { | ||
// CommonJS | ||
module.exports = TreeBase; | ||
} | ||
else { | ||
// browser | ||
window.bintrees = window.bintrees || {}; | ||
window.bintrees.TreeBase = TreeBase; | ||
} | ||
})(); |
@@ -5,3 +5,3 @@ { | ||
"description": "Binary Search Trees", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"homepage": "bitfloor.com", | ||
@@ -15,5 +15,5 @@ "repository": { | ||
}, | ||
"main": "./lib/index.js", | ||
"main": "./index.js", | ||
"scripts": { | ||
"test": "expresso ./test/test_*.js" | ||
"test": "./node_modules/.bin/expresso ./test/test_*.js" | ||
}, | ||
@@ -20,0 +20,0 @@ "dependencies": {}, |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
2325486
17
802
75
0
1