-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.js
43 lines (34 loc) · 1.06 KB
/
util.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
39
40
41
42
43
// Generated by CoffeeScript 1.6.3
(function() {
var Float, typeOf,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
typeOf = function(object) {
var funcNameRegex, results;
if (object === null) {
return null;
}
if (object === void 0) {
return void 0;
}
funcNameRegex = /function (.{1,})\(/;
results = funcNameRegex.exec(object.constructor.toString());
if (results && results.length > 1) {
return results[1];
} else {
return '';
}
};
Float = (function(_super) {
__extends(Float, _super);
function Float(num) {
this.value = Number(num);
}
Float.prototype.valueOf = function() {
return this.value;
};
return Float;
})(Number);
exports.typeOf = typeOf;
exports.Float = Float;
}).call(this);