Skip to content

Instantly share code, notes, and snippets.

View d13's full-sized avatar
🚀

Keith Daulton d13

🚀
View GitHub Profile
@d13
d13 / app.html
Last active May 30, 2020 10:11
Aurelia Gist - nav in a LayoutView
<template>
<require from="nav-bar.html"></require>
<!-- this nav works -->
<nav-bar router.bind="router"></nav-bar>
<div class="page-host" style="margin-top:50px">
<router-view router.bind="router"></router-view>
</div>
</template>
@d13
d13 / deep-search.js
Last active January 16, 2020 02:29
JS util ideas
function keyFirstSearch(obj, term) {
for (const key of Object.keys(obj)) {
if (key === term) {
return obj[term];
}
const prop = obj[key];
if (typeof prop === 'object') {
const nested = keyFirstSearch(prop, term);
if (nested !== undefined) {