diffusion
Version:
Diffusion JavaScript client
26 lines (18 loc) • 568 B
JavaScript
var Long = require('long');
function ConversationId(val) {
this.val = val;
}
ConversationId.prototype.toString = function() {
return this.val.toString(10);
};
ConversationId.prototype.toValue = function() {
return this.toString();
};
ConversationId.prototype.equals = function(other) {
return other.val && this.val.equals(other.val);
};
ConversationId.fromString = function(val) {
return new ConversationId(Long.fromString(val, false));
};
ConversationId.ONEWAY_CID = new ConversationId(Long.fromNumber(0));
module.exports = ConversationId;