Skip to content

Latest commit

 

History

History
73 lines (52 loc) · 1.11 KB

README.md

File metadata and controls

73 lines (52 loc) · 1.11 KB

Coordis 📌🌎

Coordis is a library to help you to deal with calculations involving geographical coordinates and conversion of units of measurement!

Steps to run this library 👇👇👇

1- Installing package

$ npm install coordis

OR

$ yarn add coordis

2- Enter in folder

const coordis = require('coordis');

OR

import coordis from 'coordis';

3- Usage

const coordis = require('coordis');

const distanceInKm = coordis.toKilometers(
    {
        latitude: -23.6144942,
        longitude: -46.7775026
    },
    {
        latitude: -23.6144785,
        longitude: -46.8453548
    }
);

const distanceInMiles = coordis.toMiles(
    {
        latitude: -23.6144942,
        longitude: -46.7775026
    },
    {
        latitude: -23.6144785,
        longitude: -46.8453548
    }
);

console.log(distanceInKm, distanceInMiles);

Package Link: https://www.npmjs.com/package/coordis

Complete Docs: https://www.npmjs.com/package/coordis