diff --git a/components/00_Global/_selectorHook.styl b/components/00_Global/_selectorHook.styl deleted file mode 100644 index 4c4e1ac..0000000 --- a/components/00_Global/_selectorHook.styl +++ /dev/null @@ -1,32 +0,0 @@ -_thrown_hooks = {} -_caught_hooks = {} - -RV-Utils__Hook--throw(name, callback) - if name in _thrown_hooks - hook = _thrown_hooks[name] - else - hook = {} - - hook[selector()] = callback - _thrown_hooks[name] = hook - -RV-Utils__Hook--catch(name, context) - if selector() in _caught_hooks - _catches = _caught_hooks[selector()] - else - _catches = {} - _catches[name] = context - _caught_hooks[selector()] = _catches - - for name, hook in _thrown_hooks - if selector() in hook - hook[selector()](context) - -_generate_hooks() - for catched_selector, catches in _caught_hooks - for name, context in catches - if name in _thrown_hooks - hook = _thrown_hooks[name] - for thrown_selector, callback in hook - {thrown_selector}{catched_selector} - callback(context) \ No newline at end of file