This commit is contained in:
sokol
2026-02-18 11:38:25 +03:00
commit 83a5bb87c1
40 changed files with 5803 additions and 0 deletions

32
src/models/EnvParam.ts Normal file
View File

@@ -0,0 +1,32 @@
import { NamedId } from "./NamedId";
export class EnvParam implements NamedId {
constructor(
public id?: number,
public name?: string,
public value?: string,
public isChanged: boolean = false
) { }
public Changed(v: boolean = true): EnvParam {
return new EnvParam(
this.id,
this.name,
this.value,
v);
}
public sanitize(v?: string): string {
return v?.replace(/&/g, "&amp")
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;')
?? "";
}
public humanize(v?: string): string {
return v ?? "";
}
}