This repository was archived by the owner on Nov 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patho.js
More file actions
66 lines (47 loc) · 1.29 KB
/
o.js
File metadata and controls
66 lines (47 loc) · 1.29 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(function (thiz) {
/*
* O - a chained thought
* version 1.2, 30 november 2009 - http://o.sullof.com
* Copyright (c) 2008+ Francesco Sullo
* Licensed as Open Source under MIT License
*/
var _O = thiz.O,
O = thiz.O = function (o) {
return new O._._(o);
};
O.info = {
version: "1.2",
release: "2009-11-30"
};
O._ = O.prototype = {
_: function (o) {
this.O = o;
this.L = [o ? '' : 'Oops'];
this.constructor = O;
return this;
},
log: function (l) {
if (l) this.L.push(l);
},
end: function (obj) {
var o = this.O;
delete this.O;
if (typeof obj == 'object') obj.log = this.L;
delete this.L;
return o;
}
};
O._._.prototype = O._;
// container for private ojects:
O.__ = {};
// this extends static methods:
O.expand = function () {
for (var j in arguments[0])
O[j] = arguments[0][j];
};
// This extends object's methods:
O.extend = function () {
for (var j in arguments[0])
O._[j] = arguments[0][j];
};
})(this);