Files
speckle-server/packages/frontend/src/helpers/randomHelpers.js
T
Kristaps Fabians Geikins e8869e210c feat(frontend): build speed & chunk structure optimization (#690)
* feat(frontend): build speed & chunk structure optimization

* fix: attempting to work around precommit inconsistent eslint config

* chore(pre-commit config): ignore mocharc for eslint

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-04-13 10:21:24 +03:00

11 lines
246 B
JavaScript

/**
* Generate a random string of any length
* @param {number} length
* @returns
*/
export function randomString(length) {
return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length))
.toString(36)
.slice(1)
}