-
Notifications
You must be signed in to change notification settings - Fork 0
/
revisionary.js
38 lines (32 loc) · 907 Bytes
/
revisionary.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Generated by CoffeeScript 1.9.1
(function() {
var core, engines, git,
slice = [].slice;
core = require('./core');
git = require('./git');
core.Store.create = function() {
var args, cls, engine;
engine = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
cls = engines[engine];
if (cls != null) {
return (function(func, args, ctor) {
ctor.prototype = func.prototype;
var child = new ctor, result = func.apply(child, args);
return Object(result) === result ? result : child;
})(cls, args, function(){});
} else {
throw new Error("Unknown engine `" + engine + "`");
}
};
engines = {
git: git
};
module.exports = {
Store: core.Store,
Author: core.Author,
Change: core.Change,
Resource: core.Resource,
Revision: core.Revision,
engines: engines
};
}).call(this);