Skip to content

Instantly share code, notes, and snippets.

View mageowl's full-sized avatar
🤖
Waiting for Godot

Owen L. mageowl

🤖
Waiting for Godot
View GitHub Profile
@mageowl
mageowl / obj-map.js
Last active May 24, 2021 23:29
Array map on objects.
function omap(object, cb) {
return Object.fromEntries(Object.entries(object).map(cb));
}
const mappable = {
map(cb) {return omap(this, cb)}
}
const abc = {
a: 1,
@mageowl
mageowl / staticConstructor.js
Created March 30, 2021 23:56
Syntactic sugar.
class Property {
constructor(name, value) {
this.arr = [name, value];
}
}
class Name extends Property {
constructor("name", "Owen") // static constructor, values are passed directly to "super".
/*
constructor() {
@mageowl
mageowl / jack-o-latern-inc
Last active November 6, 2020 00:26
Jack`o`Lantern Inc. (PuzzleScript Game)
Play this game by going to https://www.puzzlescript.net/play.html?p=88c1f7434eb361c1cf9aa56901e8a9c9
@mageowl
mageowl / magnetic-game
Last active July 6, 2020 19:55
Magnetic (PuzzleScript Game)
See comments for link to play.