migratory-js
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    migratory-js

    Library for convert decimal latitude and longitude to degrees, minutes, seconds and degrees, minutes.

    codecov

    main ci

    Installation

    $ npm install migratory-js
    

    or

    $ yarn install migratory-js
    

    Usage

    import { GeoNumber, DecimalConverter }
    
    const geoNumber = new GeoNumber(0, true)
    console.log(geoNumber.toDms(35.3, true).toDms().toString())
    // 35°18′0″N
    
    const decimalConverter = new DecimalConverter(-15.4, 35.0)
    console.log(decimalConverter.toDmm().latitude.toString())
    // 15°24′S
    console.log(decimalConverter.toDmm().longitude.toString())
    // 35°0′E
    console.log(decimalConverter.toDmm().longitude)
    // {
    //   degree: 35,
    //   minute: 0,
    //   direction: 'E',
    //   toString: [Function: toString]
    // }

    Install

    npm i migratory-js

    DownloadsWeekly Downloads

    29

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    41.1 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar