• Converts feet to what the world is using as a measurement unit.

    Parameters

    • value: number

      The value (in feet) to convert.

    • type: "mi" | "ft" = "ft"

      The original type to convert from. Either 'ft' (feet, default) or 'mi' (miles, in which case the result is in km (metric))

    Returns number[]

    An array containing the converted value in index 0 and the new unit key in index 1 (for use in PF1.measureUnits, for example)

    Example

    // With metric enabled
    pf1.utils.convertDistance(30); // => [9, "m"]

Generated using TypeDoc