Use if instead of switch for LOCAL vs GLOBAL vs default, and move the fun.on function declaration down to where it's used
Use if instead of switch for LOCAL vs GLOBAL vs default, and move the fun.on function declaration down to where it's used

marcuswestin/fun