Merge pull request #8071 from engix-ltd/base64_api

Add Base64 functions to Utils service.
This commit is contained in:
Igor Kulikov 2023-03-28 19:29:27 +03:00 committed by GitHub
commit c7c6f2cbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,11 @@ import {
isDefined,
isDefinedAndNotNull,
isString,
isUndefined
isUndefined,
objToBase64,
objToBase64URI,
base64toString,
base64toObj
} from '@core/utils';
import { WindowMessage } from '@shared/models/window-message.model';
import { TranslateService } from '@ngx-translate/core';
@ -518,4 +522,21 @@ export class UtilsService {
refCount()
);
}
public objToBase64(obj: any): string {
return objToBase64(obj);
}
public base64toString(b64Encoded: string): string {
return base64toString(b64Encoded);
}
public objToBase64URI(obj: any): string {
return objToBase64URI(obj);
}
public base64toObj(b64Encoded: string): any {
return base64toObj(b64Encoded);
}
}