begin converting WakatimeCore
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Returns domain from given URL.
|
||||
*/
|
||||
export function getDomainFromUrl(url: string): string {
|
||||
export default function getDomainFromUrl(url: string): string {
|
||||
const parts = url.split('/');
|
||||
|
||||
return parts[0] + '//' + parts[2];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Returns boolean if needle is found in haystack or not.
|
||||
*/
|
||||
export function in_array<T>(needle: T, haystack: T[]): boolean {
|
||||
export default function in_array<T>(needle: T, haystack: T[]): boolean {
|
||||
for (let i = 0; i < haystack.length; i++) {
|
||||
if (needle == haystack[i]) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user