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

interval-tree-1d

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interval-tree-1d - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

interval-tree.js

@@ -255,3 +255,3 @@ "use strict"

if(r) { return r }
} else if(this.lo > this.mid) {
} else if(lo > this.mid) {
var r = reportRange(this.rightPoints, lo, hi, cb, compareXEnd)

@@ -258,0 +258,0 @@ if(r) { return r }

{
"name": "interval-tree-1d",
"version": "1.0.0",
"version": "1.0.1",
"description": "1D interval tree data structure",

@@ -5,0 +5,0 @@ "main": "interval-tree.js",

@@ -5,4 +5,20 @@ interval-tree-1d

**Work in progress**
# Example
```javascript
var createIntervalTree = require("interval-tree-1d")
//Create some random list of intervals
var intervals = [ [1, 2], [-1, 0], [0.5, 1], [-10, 10] ]
//Build tree
var tree = createIntervalTree(intervals)
//Find all intervals containing query point 0.7
console.log("querying point:", 0.7)
tree.queryPoint(0.7, function(interval) {
console.log(interval)
})
```
# API

@@ -9,0 +25,0 @@

@@ -19,3 +19,3 @@ var util = require("util")

console.log(util.inspect(t, {depth:10}))
//console.log(util.inspect(t, {depth:10}))

@@ -33,3 +33,2 @@ /*

console.log(i)
})
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