@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 2.65 kB
JavaScript
import{unwrapOr as t}from"./maybe.js";import{toUnit as r}from"./quantityUtils.js";import{formatDecimal as e,formatRelativeDecimal as a,formatMetricLength as n,formatMetricRelativeLength as u,formatMetricVerticalLength as i,formatMetricRelativeVerticalLength as c,formatMetricArea as o,formatImperialLength as l,formatImperialRelativeLength as f,formatImperialVerticalLength as m,formatImperialRelativeVerticalLength as b,formatImperialArea as s,formatDMS as v,formatAngleDegrees as p,formatRelativeAngleDegrees as h}from"./unitFormatUtils.js";function g(t,a,n,u=2,i="abbr"){return e(t,r(a,n).value,n,u,i)}function L(t,e,n,u=2,i="abbr"){return a(t,r(e,n).value,n,u,i)}function M(t,r,e=2,a="abbr"){return n(t,r.value,r.unit,e,a)}function d(t,r,e=2,a="abbr"){return u(t,r.value,r.unit,e,a)}function w(t,r,e=2,a="abbr"){return i(t,r.value,r.unit,e,a)}function I(t,r,e=2,a="abbr"){return c(t,r.value,r.unit,e,a)}function R(t,r,e=2,a="abbr"){return o(t,r.value,r.unit,e,a)}function y(t,r,e=2,a="abbr"){return l(t,r.value,r.unit,e,a)}function V(t,r,e=2,a="abbr"){return f(t,r.value,r.unit,e,a)}function j(t,r,e=2,a="abbr"){return m(t,r.value,r.unit,e,a)}function D(t,r,e=2,a="abbr"){return b(t,r.value,r.unit,e,a)}function A(t,r,e=2,a="abbr"){return s(t,r.value,r.unit,e,a)}function T(t){return v(t.value,t.unit)}function U(t,r,e){return p(t.value,t.unit,t.rotationType,r,e)}function q(t,r,e){return h(t.value,t.unit,t.rotationType,r,e)}function x(r,e,a,n,u="abbr"){switch(n=t(n,2),a){case"imperial":return y(r,e,n,u);case"metric":return M(r,e,n,u);default:return g(r,e,a,n,u)}}function F(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return V(t,r,a,n);case"metric":return d(t,r,a,n);default:return L(t,r,e,a,n)}}function S(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return j(t,r,a,n);case"metric":return w(t,r,a,n);default:return g(t,r,e,a,n)}}function k(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return D(t,r,a,n);case"metric":return I(t,r,a,n);default:return L(t,r,e,a,n)}}function z(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return A(t,r,a,n);case"metric":return R(t,r,a,n);default:return g(t,r,e,a,n)}}export{U as formatAngle,z as formatArea,T as formatDMS,g as formatDecimal,A as formatImperialArea,y as formatImperialLength,V as formatImperialRelativeLength,D as formatImperialRelativeVerticalLength,j as formatImperialVerticalLength,x as formatLength,R as formatMetricArea,M as formatMetricLength,d as formatMetricRelativeLength,I as formatMetricRelativeVerticalLength,w as formatMetricVerticalLength,q as formatRelativeAngle,L as formatRelativeDecimal,F as formatRelativeLength,k as formatRelativeVerticalLength,S as formatVerticalLength};