Skip to content

Instantly share code, notes, and snippets.

View olehermanse's full-sized avatar

Ole Herman Schumacher Elgesem olehermanse

View GitHub Profile
from cfbs.pretty import pretty
def mock_get_input():
return [
{
"type": "list",
"variable": "files",
"namespace": "delete_files",
"bundle": "delete_files",
@olehermanse
olehermanse / type_of.ts
Created February 13, 2024 15:07
An experiment in trying to determine the "type" of something
class Mock extends Object {
userid: string;
username: string;
}
function type_of_extended(a: any): string[] {
const to = typeof a;
if (["string", "number", "boolean", "null", "undefined"].includes(to)) {
return [to];
}