add endpoint to HF

This commit is contained in:
Henry
2023-07-07 17:36:23 +01:00
parent 4dd43fb2c4
commit 0923a35683
8 changed files with 316 additions and 4 deletions
+14
View File
@@ -201,6 +201,20 @@ export const getAvailableURLs = async (url: string, limit: number) => {
}
}
/**
* Get env variables
* @param {string} url
* @param {number} limit
* @returns {string[]}
*/
export const getEnvironmentVariable = (name: string): string | undefined => {
try {
return typeof process !== 'undefined' ? process.env?.[name] : undefined
} catch (e) {
return undefined
}
}
/**
* Custom chain handler class
*/