You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

8 lines
311 B

const formatUnit = require('format-unit').default
const formatcoords = require('formatcoords')
module.exports = {
distance: value => formatUnit('length')(value)(['mm', 'cm', 'm', 'km']),
area: value => formatUnit('area')(value)(['cm2', 'm2', 'ha', 'km2']),
coord: value => formatcoords(value).format()
}