gs-download
Version:
Downloader of Genius Scan PDFs files
19 lines • 587 B
JavaScript
const WIDTH = 25;
export default class FileInfo {
constructor(uid, name) {
this.uid = uid;
this.name = name;
this.simplifiedName = this.name
.replace(/\s*\([^)]*\)\s*/g, '')
.replace(/\.pdf$/i, '')
.trim();
const normalizedName = this.name.trim();
if (normalizedName.length > WIDTH) {
this.labeledName = `${normalizedName.slice(0, WIDTH - 1)}…`;
}
else {
this.labeledName = normalizedName.padEnd(WIDTH);
}
}
}
//# sourceMappingURL=file-info.model.js.map