Threaded mode~

This commit is contained in:
kibigo!
2018-01-05 18:23:06 -08:00
parent 6932b464e6
commit e4bc013d6f
9 changed files with 157 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;
}