MCPcopy Create free account
hub / github.com/TheNetsky/Microsoft-Rewards-Script / validateEmail

Function validateEmail

scripts/utils.js:47–55  ·  view source on GitHub ↗
(email)

Source from the content-addressed store, hash-verified

45}
46
47export function validateEmail(email) {
48 if (!email || typeof email !== 'string' || !email.includes('@')) {
49 log('ERROR', `Invalid or missing -email argument: ${JSON.stringify(email)}`)
50 log('ERROR', 'Usage: node script.js -email you@example.com')
51 process.exit(1)
52 }
53
54 return email
55}
56
57export function loadJsonFile(possiblePaths, required = true) {
58 for (const filePath of possiblePaths) {

Callers 1

browserSession.jsFile · 0.90

Calls 1

logFunction · 0.85

Tested by

no test coverage detected