# @divyadarshan/from-to

> from-to is a powerful and user-friendly npm package designed to calculate the distance between two sets of geographic coordinates. Whether you're building a location-based application, a mapping tool, or simply need to determine the distance between two p

Latest version **1.1.0** (published 2023-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install @divyadarshan/from-to
pnpm add @divyadarshan/from-to
yarn add @divyadarshan/from-to
bun add @divyadarshan/from-to
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-08-12 |
| First published | 2023-07-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | divyadarshan soni |
| Maintainers | divyadarshan |
| Keywords | distance, nodejs, javascript, from-to |

## Links

- npm: https://www.npmjs.com/package/@divyadarshan/from-to
- npm.io page: https://npm.io/package/@divyadarshan/from-to

## Recent versions

- 1.1.0 (latest) — 2023-08-12
- 1.0.8 — 2023-08-12
- 1.0.3 — 2023-07-30
- 1.0.2 — 2023-07-30
- 1.0.1 — 2023-07-26
- 1.0.0 — 2023-07-26

## README

# from-to

## Example

### Import

```javascript
const FromTo = require('@divyadarshan/from-to')
// or
import FromTo from '@divyadarshan/from-to'
```

### Distance in Kilometers / Miles

```javascript
const a = { latitude: 37.8136, longitude: 144.9631 }
const b = { latitude: 33.8650, longitude: 151.2094 }

console.log(FromTo.distanceInKilometers(a, b)) // 713.70 (in kilometers)

console.log(FromTo.distanceInMiles(a, b)) // 713.70 (in miles)
```
## Time - time to cover the distance

```javascript

const distance = 713.70 // in kilometers
const speed = 60; // per hour speed

console.log(FromTo.time(distance,speed)) // 713.7 (in minutes)
```

---
_Source: https://npm.io/package/@divyadarshan/from-to · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
