@seismo/core
Version:
This is the package for the core library of Seismo, a JavaScript library for seismic data processing and visualization. It provides utilities for handling seismic data, including FDSN web services, waveform processing, and event handling. The library is d
35 lines (34 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.depthMeterFormat = exports.depthFormat = exports.depthNoUnitFormat = exports.magFormat = exports.latlonFormat = void 0;
const lang = typeof navigator !== "undefined" && navigator?.language
? navigator?.language
: "en-US";
exports.latlonFormat = new Intl.NumberFormat(lang, {
style: "unit",
unit: "degree",
unitDisplay: "narrow",
maximumFractionDigits: 2,
});
exports.magFormat = new Intl.NumberFormat(lang, {
style: "decimal",
maximumFractionDigits: 2,
});
exports.depthNoUnitFormat = new Intl.NumberFormat(lang, {
style: "decimal",
maximumFractionDigits: 2,
});
exports.depthFormat = new Intl.NumberFormat(lang, {
style: "unit",
unit: "kilometer",
unitDisplay: "narrow",
maximumFractionDigits: 2,
minimumFractionDigits: 2,
});
exports.depthMeterFormat = new Intl.NumberFormat(lang, {
style: "unit",
unit: "meter",
unitDisplay: "narrow",
maximumFractionDigits: 1,
minimumFractionDigits: 1,
});