irby / passwordless-authenticator-poc

Require template literals instead of string concatenation JS-0246
Anti-pattern
Minor
a year agoa year old
122
123        let data = event.data;
124        if (event.data.sender) {
125          data = event.data.sender + ": " + data;126        }
127        this.messages.push(data);
128      }
16
17        for (; i < totalLines; i++) {
18            lineNumber++;
19            lineId = 'line' + lineNumber;20            lines[i].id = lineId;
21            if (lineId === anchorHash) {
22                lines[i].className += ' selected';
39
40  public cleanBrowser(userAgent: string) {
41    if (userAgent?.length > 15) {
42      return userAgent.substring(0, 15) + '...';43    }
44    return userAgent;
45  }