diff --git a/integrations/javascript/src/entities/LicenseMeta.ts b/integrations/javascript/src/entities/LicenseMeta.ts new file mode 100644 index 0000000..d7006f3 --- /dev/null +++ b/integrations/javascript/src/entities/LicenseMeta.ts @@ -0,0 +1,21 @@ +export class LicenseMeta { + public readonly key: string; + public readonly value: string; + + constructor(key: string, value: string) { + this.key = key; + this.value = value; + } + + public getAsInteger(): number { + return parseInt(this.value, 10); + } + + public getAsDouble(): number { + return parseFloat(this.value); + } + + public getAsBoolean(): boolean { + return this.value.toLowerCase() === 'true'; + } +}