sinProject-Inc/talk

View on GitHub
src/lib/auth/mail_subject.ts

Summary

Maintainability
A
0 mins
Test Coverage
export class MailSubject {
    private readonly _subject: string

    public constructor(subject: string) {
        if (!subject) throw new Error('Mail subject is required')
        if (subject.length > 100) throw new Error('Mail subject is too long')

        this._subject = subject
    }

    public get subject(): string {
        return this._subject
    }
}