encode config

This commit is contained in:
fyears
2022-01-05 10:04:58 +08:00
parent f0dd3bb5ef
commit 9eddfb02d6
4 changed files with 107 additions and 2 deletions
+9
View File
@@ -199,3 +199,12 @@ export const getRandomArrayBuffer = (byteLength: number) => {
const k = window.crypto.getRandomValues(new Uint8Array(byteLength));
return bufferToArrayBuffer(k);
};
/**
* https://stackoverflow.com/questions/958908
* @param x
* @returns
*/
export const reverseString = (x: string) => {
return [...x].reverse().join("");
};