Skip to content

Instantly share code, notes, and snippets.

Avatar

Donovan Hutchinson donovanh

View GitHub Profile
@mgutz
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
maxogden / readme.md
Last active Oct 12, 2015
introduction to node
View readme.md
You can’t perform that action at this time.