mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
export default class Name {
|
||||
|
||||
private _title : string = '';
|
||||
public get title() : string {
|
||||
return this._title;
|
||||
}
|
||||
public set title(v : string) {
|
||||
this._title = v;
|
||||
}
|
||||
|
||||
private _name: string = '';
|
||||
public get name(): string {
|
||||
return this._name;
|
||||
}
|
||||
public set name(v: string) {
|
||||
this._name = v;
|
||||
}
|
||||
|
||||
constructor(name: string) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
getFirstName() {
|
||||
return this.name.split(' ')[0];
|
||||
}
|
||||
|
||||
getLastName() {
|
||||
return this.name.split(' ')[this.name.split(' ').length -1];
|
||||
}
|
||||
|
||||
getMiddleName() {
|
||||
return this.name.split(' ')[0];
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ export default class Port {
|
||||
public get port(): PositiveNumber {
|
||||
return this._port;
|
||||
}
|
||||
public set port (v: PositiveNumber) {
|
||||
public set port(v: PositiveNumber) {
|
||||
this._port = v;
|
||||
}
|
||||
|
||||
constructor (port: number) {
|
||||
if (port >= 0 && port <= 65535) {
|
||||
constructor(port: number) {
|
||||
if (port >= 0 && port <= 65535) {
|
||||
this.port = new PositiveNumber(port);
|
||||
} else {
|
||||
throw new BadDataException(
|
||||
|
||||
Reference in New Issue
Block a user