JSFiddle - React, Tailwind, and code Playground
by Eric Howe
CoffeeScript
namespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
namespace '', (exports, root) -> root.namespace = namespace
console.log(window.namespace)