mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-03 06:53:49 +01:00
* Rev up prettier * Reformat * Remove deprecated tslint * Remove call to tslint and update package-lock.json
8 lines
215 B
TypeScript
8 lines
215 B
TypeScript
export const utf8ToB64 = (utf8Str: string): string => {
|
|
return btoa(
|
|
encodeURIComponent(utf8Str).replace(/%([0-9A-F]{2})/g, (_, args) => {
|
|
return String.fromCharCode(parseInt(args, 16));
|
|
}),
|
|
);
|
|
};
|