otsdaq_utilities  v2_05_02_indev
STDLINE.js
1 /*
2  Author : D. Menasce
3  Usage : STDLINE(string) ;
4  Purpose: Formatter of console.log printouts in the Firefox javascript debugger
5 */
6 
7 function STDLINE(str)
8 {
9  const e = new Error();
10  const a = e.stack.split("\n")[1] ;
11  const w = a.split("/") ;
12  const s = w.length -1 ;
13  const l = w[s].split(":")[1] ;
14  const n = w[s].split(":")[0] ;
15  const m = l+"] ["+n+"] "+str
16  console.log(m) ;
17 }
18 
19 function STDGETLNUM()
20 {
21  const e = new Error();
22  const a = e.stack.split("\n")[1] ;
23  const w = a.split("/") ;
24  const s = w.length -1 ;
25  const l = w[s].split(":")[1] ;
26  const n = w[s].split(":")[0] ;
27  return l ;
28 }
29