title: How to check if a given ip falls between a given ip range using node js
body: <p>Please pardon for this trival question</p>
  
  <p>Given a set of Ip the set is quite large and might increase
  <a href="https://github.com/client9/ipcat/blob/master/datacenters.csv#L4" rel="noreferrer">https://github.com/client9/ipcat/blob/master/datacenters.csv#L4</a></p>
  
  <p>Small example set - <strong>first column start ip second - end ip range</strong></p>
  
  <p><a href="https://i.stack.imgur.com/Myb3K.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Myb3K.png" alt="enter image description here"></a></p>
  
  <p>I will get the user ip from the request . I need to check if the ip falls in these set of ranges . How do i accomplish this.</p>
  
  <p>I have looked into <a href="https://www.npmjs.com/package/ip-range-check" rel="noreferrer">ip_range_check</a> and  <a href="https://www.npmjs.com/package/range_check" rel="noreferrer">range_check</a>.</p>
  
  <p>But they donot check for a ip given given range . How is thhis possible in node js with utmost performance. I dont want to go for a exhaustive search as performance is a hight priority.</p>
  
  <p>Please help something new and quite challenging so far to me.</p>