Merge pull request #296 from glitch-soc/thread-mode

Threaded mode~
This commit is contained in:
beatrix
2018-01-06 11:28:36 -05:00
committed by GitHub
10 changed files with 217 additions and 48 deletions

View File

@@ -0,0 +1,5 @@
// This function returns the new value unless it is `null` or
// `undefined`, in which case it returns the old one.
export function overwrite (oldVal, newVal) {
return newVal === null || typeof newVal === 'undefined' ? oldVal : newVal;
}