send/server/metadata.js
2020-07-24 08:32:43 -07:00

16 lines
381 B
JavaScript

class Metadata {
constructor(obj) {
this.dl = +obj.dl || 0;
this.dlimit = +obj.dlimit || 1;
this.pwd = String(obj.pwd) === 'true';
this.owner = obj.owner;
this.metadata = obj.metadata;
this.auth = obj.auth;
this.nonce = obj.nonce;
this.flagged = !!obj.flagged;
this.dead = !!obj.dead;
this.key = obj.key;
}
}
module.exports = Metadata;