Passed
Branch master (5df6c0)
by Michael
02:01
created

src/utils.ts   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 12
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
mnd 1
bc 1
fnc 0
dl 0
loc 12
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import './types'
2
3
export const native_ws = (() => {try {return WebSocket||null}catch { return null }})()
4
5
export const add_event = (o: wsc.Socket, e: string, handler: wsc.EventHandler) => {
6
  return o.addEventListener(e, handler)
7
}
8
9
export const sett = (
10
  a: number,
11
  b: { (): void; (...args: any[]): void; }
12
) => setTimeout(b, a)