meters

Convert string distances to meters

meters

Converts string distances into meters.

var m = require('meters')
m('1 mile')
// 1609.34 
m('5nm')
// 9260 
m('1,200 yds')
// 1097.28 
m('10cm')
// 0.1 
m('6\'8"')
// 2.032 

With component or npm:

$ component install lvivier/meters
 
$ npm install meters

Attempts to convert str into meters from common units.