Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/somefn/js/str.ts>genRandomString

some functions for deno
Go to Latest
function genRandomString
import { genRandomString } from "https://deno.land/x/somefn@v0.17.3/js/str.ts";

Generate a new random string

Parameters

len: number

Should less than 65536

optional
map = [UNSUPPORTED]

Better is 256 % map.length = 0

  • abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-= (all)
  • abcdefghijkmnpqrstuvwxyz23456789 (lite)

Returns

string

A ramdom string