29 lines
575 B
JavaScript
29 lines
575 B
JavaScript
// Generated by CoffeeScript 1.7.1
|
|
(function() {
|
|
var BooleanT;
|
|
|
|
BooleanT = (function() {
|
|
function BooleanT(type) {
|
|
this.type = type;
|
|
}
|
|
|
|
BooleanT.prototype.decode = function(stream, parent) {
|
|
return !!this.type.decode(stream, parent);
|
|
};
|
|
|
|
BooleanT.prototype.size = function(val, parent) {
|
|
return this.type.size(val, parent);
|
|
};
|
|
|
|
BooleanT.prototype.encode = function(stream, val, parent) {
|
|
return this.type.encode(stream, +val, parent);
|
|
};
|
|
|
|
return BooleanT;
|
|
|
|
})();
|
|
|
|
module.exports = BooleanT;
|
|
|
|
}).call(this);
|