Files
scrypted/plugins/sip/src/util.ts
slyoldfox b593209558 Fix bticino intercom, clean up some dependencies (#1463)
* Allow setting the DEVADDR option

* Fix intercom by using startRtpForwarderProcess()
Clean up some dependencies

* Allow logging errors in sip-manager
Cleanup bloated and barely used dependencies
2024-05-06 13:07:30 -07:00

15 lines
352 B
TypeScript

const crypto = require('crypto');
export function generateUuid(seed?: string) {
return crypto.randomUUID();
}
export function randomInteger() {
return Math.floor(Math.random() * 99999999) + 100000
}
export function randomString(length: number) {
const uuid = generateUuid()
return uuid.replace(/-/g, '').substring(0, length).toLowerCase()
}