Skip to content

Instantly share code, notes, and snippets.


Donovan Hutchinson donovanh

View GitHub Profile
mgutz / colors.js
Last active May 30, 2019
svelte3 actions and getters using nested object store
View colors.js
import {readable, writable} from 'svelte/store';
// could be its own module
const util = {
_root: null,
// similar to createSelector but instead returns a reactive variable
createGetter(store, fn, initialData) {
return readable(initialData, set => {
store.subscribe(state => set(fn(state, this._root)));
maxogden /
Last active Oct 12, 2015
introduction to node