gun uuid utility
This commit is contained in:
parent
09f717b1a3
commit
f4e6cb76c1
1 changed files with 14 additions and 2 deletions
|
|
@ -1,9 +1,21 @@
|
|||
/**
|
||||
* @format
|
||||
*/
|
||||
const Gun = require('gun')
|
||||
|
||||
const { asyncFilter } = require('./helpers')
|
||||
|
||||
module.exports = {
|
||||
asyncFilter
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
const gunUUID = () => {
|
||||
// @ts-expect-error Not typed
|
||||
const uuid = Gun.Text.random()
|
||||
|
||||
return uuid
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
asyncFilter,
|
||||
gunUUID
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue