mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 18:10:04 -04:00
Update scripts
This commit is contained in:
parent
8a83f23243
commit
f1d2add19a
98 changed files with 2423 additions and 1499 deletions
31
scripts/core/dictionary.ts
Normal file
31
scripts/core/dictionary.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
export class Dictionary {
|
||||
dict: any
|
||||
|
||||
constructor(dict?: any) {
|
||||
this.dict = dict || {}
|
||||
}
|
||||
|
||||
set(key: string, value: any) {
|
||||
this.dict[key] = value
|
||||
}
|
||||
|
||||
has(key: string): boolean {
|
||||
return !!this.dict[key]
|
||||
}
|
||||
|
||||
missing(key: string): boolean {
|
||||
return !this.dict[key]
|
||||
}
|
||||
|
||||
get(key: string): any {
|
||||
return this.dict[key] ? this.dict[key] : undefined
|
||||
}
|
||||
|
||||
keys(): string[] {
|
||||
return Object.keys(this.dict)
|
||||
}
|
||||
|
||||
data() {
|
||||
return this.dict
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue