@rws-aoa/utils
Version:
Utilities for RWS AOA libraries and applications
101 lines (94 loc) • 2.3 kB
JavaScript
;
var utilities = require('@sapphire/utilities');
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// src/IsDevEnv.ts
var isDevEnv = process.env.NODE_ENV === "development" ? true : process.env.NODE_ENV === "test";
// src/IsTestEnv.ts
var isTestEnv = process.env.NODE_ENV === "test";
// src/TimeUtils.ts
var SECOND = 1e3;
var MINUTE = SECOND * 60;
var HOUR = MINUTE * 60;
var DAY = HOUR * 24;
var DAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var MONTHS = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
var DAYS_NL = ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"];
var MONTHS_NL = [
"Januari",
"Februari",
"Maart",
"April",
"Mei",
"Juni",
"July",
"Augustus",
"September",
"October",
"November",
"December"
];
// src/WindowLocationService.ts
var WindowLocationService = class {
static {
__name(this, "WindowLocationService");
}
static get origin() {
return this.getLocation().origin;
}
static get path() {
return this.getLocation().pathname;
}
static get hash() {
return this.getLocation().hash;
}
static get search() {
return this.getLocation().search;
}
static get host() {
return this.getLocation().host;
}
static get href() {
return this.getLocation().href;
}
static redirectTo(url) {
this.getLocation().assign(url);
}
static getLocation() {
return window.location;
}
};
Object.defineProperty(exports, "capitalizeFirstLetter", {
enumerable: true,
get: function () { return utilities.capitalizeFirstLetter; }
});
Object.defineProperty(exports, "snakeToCamelCase", {
enumerable: true,
get: function () { return utilities.snakeToCamelCase; }
});
exports.DAY = DAY;
exports.DAYS = DAYS;
exports.DAYS_NL = DAYS_NL;
exports.HOUR = HOUR;
exports.MINUTE = MINUTE;
exports.MONTHS = MONTHS;
exports.MONTHS_NL = MONTHS_NL;
exports.SECOND = SECOND;
exports.WindowLocationService = WindowLocationService;
exports.isDevEnv = isDevEnv;
exports.isTestEnv = isTestEnv;
//# sourceMappingURL=index.cjs.map
//# sourceMappingURL=index.cjs.map