mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: cleaned node
This commit is contained in:
1 parent
01ed20941d
commit
ab5061ba99
28 files changed
+35
-37
No files matched your search
File renamed without changes.
@@ -1,3 +0,0 @@
|
||||
export default function errorWithCause(message: string, cause: string) {
|
||||
return new Error(message, { cause });
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
const isDevBoolean = process.env.NODE_ENV === 'development';
|
||||
|
||||
export default function isDev() {
|
||||
return isDevBoolean;
|
||||
return process.env.NODE_ENV === 'development';
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function isNumber(value: any) {
|
||||
return typeof value === 'number' && !isNaN(value) && isFinite(value);
|
||||
return typeof value === 'number' && isFinite(value);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
export interface PSAData {
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface PSA {
|
||||
data: PSAData | null;
|
||||
}
|
||||
|
||||
export const psa: PSA = { data: null };
|
||||
|
||||
console.log('Caching PSA...');
|
||||
fetch(
|
||||
'https://gist.githubusercontent.com/tresabhi/ed4b136f08856e615212e573aabe1968/raw',
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
psa.data = data as PSAData;
|
||||
console.log('PSA cached');
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export default function throwError(message: string, cause: string) {
|
||||
return new Error(message, { cause });
|
||||
}
|
||||
Reference in new issue
Block a user