‚̧Narcissistic Passion Minified
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    humanize-distance

    1.0.9¬†‚Äʬ†Public¬†‚Äʬ†Published

    humanize-distance

    Calculates a humanized distance between 2 Points (longitude, latitude)

    Example outputs: < 50m, 450m, 750yd, 0.9 mi, 2,8 km

    bitHound Overall Score npm Package travis-ci.org js-standard-style license

    Usage

    npm i humanize-distance --save
     
    const humanizeDistance = require('humanize-distance')
     
    console.log(humanizeDistance(
      {latitude: 50.95, longitude: 6.91},
      {latitude: 50.9486184, longitude: 6.9426425},
      'de-DE',
      'metric'))
    // 2,8 km
     
    console.log(humanizeDistance(
      {latitude: 50.9440107, longitude: 6.9419526},
      {latitude: 50.9486184, longitude: 6.9426425},
      'en-US',
      'us'))
    // 550 yd
     

    Twitter URL GitHub stars

    Install

    npm i humanize-distance

    DownloadsWeekly Downloads

    14

    Version

    1.0.9

    License

    MIT

    Last publish

    Collaborators

    • avatar