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

whasome-interview-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whasome-interview-api

fake location api for interview testing

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Location API

Fake Location API used for interviews

API Documentation

Data Types

POINT_OBJECT = { lat: NUMBER, lon: NUMBER }
LOCATION_OBJECT = {
    address: STRING,
    point: POINT_OBJECT
}
DATA_OBJECT = {
    name: STRING,
    practices: [LOCATION_OBJECT]
}

fetchDoctors

Fetch multiple people with location information and name

  • Input Params: None
  • Returns Promise <[DATA_OBJECT]>

getDistance

Determines distance between two coordinate object points, returns distance in miles

  • Input Params: (POINT_OBJECT, POINT_OBJECT)
  • Returns NUMBER

Example

const pointA = { lat: 38.6093425, lon: -121.5148304}
const pointB = { lat: 38.5769468, lon: -121.48017379999999 }
const distance = getDistance(pointA, pointB);
console.log(distance); // Prints 2.92

getCurrentLocation

Gets the user's current location

  • Input Params: None
  • Returns Promise <PointObject>

testSort

Returns an array of sorted doctors for testing that sort works

  • Input Params: None
  • Returns:
[
    {
        name: STRING,
        practices: [
            point: POINT_OBJECT,
            distance: NUMBER,
            address: STRING
        ]
    }
]

FAQs

Package last updated on 14 Nov 2017

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

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