Skip to content

Commit e0dc58a

Browse files
committed
Update dependencies and replace uid function with uuid-random
1 parent bc52119 commit e0dc58a

File tree

3 files changed

+36
-32
lines changed

3 files changed

+36
-32
lines changed

package-lock.json

Lines changed: 32 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"prettier": "@vuebro/configs/prettierrc",
3838
"devDependencies": {
3939
"@types/node": "^24.9.1",
40-
"@vuebro/configs": "^1.1.39"
40+
"@vuebro/configs": "^1.1.40"
4141
}
4242
}

src/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { isReactive, computed, reactive } from "vue";
2+
import uid from "uuid-random";
23

34
/* -------------------------------------------------------------------------- */
45
/* Тип универсального объекта */
@@ -16,14 +17,8 @@ const configurable = true;
1617
/* Служебные функции */
1718
/* -------------------------------------------------------------------------- */
1819

19-
const uid = () => {
20-
const url = URL.createObjectURL(new Blob()),
21-
uid = url.split("/").pop() ?? crypto.randomUUID();
22-
URL.revokeObjectURL(url);
23-
return uid;
24-
},
25-
getItems = (siblings: unObject[], parent?: unObject) =>
26-
[...siblings].reverse().map((node) => ({ siblings, parent, node }));
20+
const getItems = (siblings: unObject[], parent?: unObject) =>
21+
[...siblings].reverse().map((node) => ({ siblings, parent, node }));
2722

2823
/* -------------------------------------------------------------------------- */
2924
/* Композабл для работы с древовидным объектом */

0 commit comments

Comments
 (0)