File size: 383 Bytes
db70195
 
 
 
 
 
 
58b1ffb
db70195
58b1ffb
db70195
58b1ffb
 
 
db70195
 
58b1ffb
db70195
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export function parseTurbo(
  input?: any,
  defaultValue: boolean = false
): boolean {
  let value = defaultValue
  
  try {
    let maybeTurbo = decodeURIComponent(`${input || value}`).trim().toLowerCase()

    if (maybeTurbo === "true" || maybeTurbo === "1") { return false }

    if (maybeTurbo === "false") { return false }

    return false
  } catch (err) {}

  return false
}