Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.5 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.5 KB

@drivetech/dmm-parser

npm version npm downloads Build Status Coverage Status Maintainability dependencies Status devDependencies Status

Parser for latitude and longitude in DMM format.

Example: '3321.6735,S' -> -33.361225

Installation

$ npm i @drivetech/dmm-parser

Use

Try on Tonic

const dmm = require('@drivetech/dmm-parser');

dmm.degToDec('3321.6735,S'); // -33.361225
dmm.degToDec('07030.7640,W'); // -70.51273333333333
dmm.latToDmm(-33.361225, 4); // '3321.6735,S'
dmm.lngToDmm(-70.51273333333333, 4); // '07030.7640,W'

License

MIT