mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-22 01:27:48 +08:00
Update some JS dependencies (#13222)
* Update some JS dependencies - Update selective dependencies that are compatible with webpack 4. We can not upgrade to webpack 5 yet because `license-webpack-plugin` is incompatible. - Enable a few new eslint rules and fix new issues * fix comment Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@ -24,13 +24,7 @@ export function uniq(arr) {
|
||||
return Array.from(new Set(arr));
|
||||
}
|
||||
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
// generate a random string
|
||||
export function random(length) {
|
||||
let str = '';
|
||||
for (let i = 0; i < length; i++) {
|
||||
str += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
}
|
||||
return str;
|
||||
// strip <tags> from a string
|
||||
export function stripTags(text) {
|
||||
return text.replace(/<[^>]*>?/gm, '');
|
||||
}
|
||||
|
Reference in New Issue
Block a user