forked from forgejo/forgejo
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:
parent
965861043a
commit
58e1e5ba13
6 changed files with 878 additions and 697 deletions
|
@ -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, '');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue