mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix problem_files.git
This commit is contained in:
1 parent
e89c5cd10e
commit
a44055d54a
4 files changed
+5
-4
No files matched your search
@@ -393,6 +393,7 @@ CallableInstance.prototype = Object.create(Function.prototype);
|
||||
|
||||
const fSortR = /[^\d]+|\d+/g;
|
||||
export function sortFiles(files: { _id: string }[] | string[]) {
|
||||
if (!files?.length) return [];
|
||||
const isString = typeof files[0] === 'string';
|
||||
const result = files
|
||||
.map((i) => (isString ? { name: i, weights: i.match(fSortR) } : { ...i, weights: i._id.match(fSortR) }))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.13",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user