Module¶
(c) 2013-2014 http://ircanywhere.com
Author: Ricki Hastings
IRCAnywhere server/basemodule.js
- class
Module.
Module
()¶Base class for creating modules
Returns: void.. js:class:: Module.undefined()
-
Module.
extend
(object)¶ Extend function used to extend objects with base module functionality so they can hook into core events. This should only be called once per module, if a module needs to contain multiple files, this object can be pulled in from multiple files with exports and require and the output can be extended once.
Arguments: - object (object) – The module object to extend
Returns: void.. js:class:: Module.undefined()
-
Module.
bindFunction
(key, classObject, split, fn, object)¶ Used to bind hooks for a function on a core object
Arguments: - key (string) – Class name
- classObject (object) – Class object
- split (array) – An array containing two values, ‘pre|post|hook’ and method name
- fn (function) – A callback
- object (object) – The base object where the fn belongs in
Returns: void