mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
11 lines
No EOL
245 B
JavaScript
11 lines
No EOL
245 B
JavaScript
FP.Hooks = (function(){
|
|
|
|
"use strict";
|
|
return {
|
|
register: function(name) {
|
|
if(this[name] === undefined) { this[name] = {}; }
|
|
if(typeof this[name] !== 'object') { throw "Already registered: "+name; }
|
|
return this[name];
|
|
}
|
|
};
|
|
})(); |