New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

le-neighbors

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

le-neighbors

Find the nearest neighbors of any address!

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

Neighbors

The best way to find the nearest neighbors of any address in the US.

Requirements

No external packages. Just remember to npm install before using.

Usage

Here's a quick example:

var Neighbors = require('le-neighbors');
var neighbors = new Neighbors(authID, authToken);

var address = '750 Virginia Park Street, Detroit, MI 48202';
neighbors.findNeighbors(address)
  .then(function(ret) {
    console.log(ret);
  });

The console should log the following:

{ up: '760 Virginia Park Street',
  down: '740 Virginia Park Street',
  acrossUp: '759 Virginia Park Street',
  acrossDown: '743 Virginia Park Street' }

Note that the default maximum number of steps to take is 20. For the houses on the same side of the street in our example, that means we're looking at 710-790 on the even side, and 711-791 on the odd side. (Steps are in numerical increments of two, since we know if we're on the even or odd side of the street.) We do that to limit the number of API calls, which is how SmartyStreets charges.

Keywords

addresses

FAQs

Package last updated on 24 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts