Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback not returning undefined or null if no interval matches #13

Open
rahulrsingh09 opened this issue Sep 14, 2017 · 0 comments
Open

Comments

@rahulrsingh09
Copy link

rahulrsingh09 commented Sep 14, 2017

I want to know if the value is there in the interval ranges but the call back just passes over it if not value is found nothing returned


var createIntervalTree = require("interval-tree-1d")

//Create some random list of intervals
var intervals = [ [1, 2], [-1, 0], [0.5, 1] ]

//Build tree
var tree = createIntervalTree(intervals)

//Find all intervals containing query point 0.7
//console.log("querying point:", 0.7)
var value = tree.queryPoint(11, function(interval) {
    console.log(interval); prints nothing blank
});

@rahulrsingh09 rahulrsingh09 changed the title How to query the queryPoint in a synchronous context Callback not returning undefined or null if no interval matches Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant