Update scripts

This commit is contained in:
freearhey committed 2025-02-22 12:54:00 +03:00
1 parent 005812584d
commit 6e26d46def
6 files changed
+63 -29

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { Dictionary } from '@freearhey/core'
export class IssueData {
_data: Dictionary
constructor(data: Dictionary) {
this._data = data
}
has(key: string): boolean {
return this._data.has(key)
}
missing(key: string): boolean {
return this._data.missing(key) || this._data.get(key) === undefined
}
getBoolean(key: string): boolean {
return Boolean(this._data.get(key))
}
getString(key: string): string {
const deleteSymbol = '~'
return this._data.get(key) === deleteSymbol ? '' : this._data.get(key)
}
getArray(key: string): string[] {
const deleteSymbol = '~'
return this._data.get(key) === deleteSymbol ? [] : this._data.get(key).split(';')
}
}