Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nearest-loc-finder

kunal.nischal25ISC1.1.2

This will return data points within provided distance.

geo-finder

readme

/* This code will require the geo npm module then call getNearestCustomers Method from library. */

npm install nearest-loc-finder

const GeoLocation = require("nearest-loc-finder"); //Import Geo Module

let distance = 100; //In KM

let customers = GeoLocation.getNearestRecords(28.5355, 77.3910, distance, "KM") //With 100 KM to Dublin

let sortedCustomers = GeoLocation.sortRecords(customers, "asc"); // Sorting of customers

console.log("list of customers in", distance, "KM: ", sortedCustomers);