Files
scrypted/plugins/homekit/src/pincode.ts
2021-09-23 23:29:04 -07:00

8 lines
180 B
TypeScript

function rd() {
return Math.round(Math.random() * 100000) % 10;
}
export function randomPinCode() {
return `${rd()}${rd()}${rd()}-${rd()}${rd()}-${rd()}${rd()}${rd()}`;
}