mirror of
https://github.com/186526/handlers.js
synced 2024-10-13 00:29:43 +00:00
17 lines
357 B
TypeScript
17 lines
357 B
TypeScript
export const firstUpperCase = ([first, ...rest]: string) =>
|
|
first?.toUpperCase() + rest.join("");
|
|
export const platform = (() => {
|
|
if (typeof process != "undefined") {
|
|
return "Node.js";
|
|
}
|
|
return "UNKNOWN";
|
|
})();
|
|
export const version = (() => {
|
|
switch (platform) {
|
|
case "Node.js":
|
|
return process.version;
|
|
default:
|
|
return "UNKNOWN";
|
|
}
|
|
})();
|