@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
12 lines (10 loc) • 315 B
JavaScript
'use client'
const randomString = (length) => {
const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
let result = '';
for (let i = length; i > 0; --i) {
result += CHARS[Math.floor(Math.random() * CHARS.length)];
}
return result;
};
export { randomString };