fcf.parseStack() function
[{file ,function ,line ,column }] fcf.parseStack (string |Error a_stack)
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Parses a string containing information about the stack obtained from
Arguments
- A string containing the stack or error object
Result
[{file ,function ,line ,column }]
- An array containing objects with information about function calls. The object contains the following properties:
-
string file - JS file from which the call was made -
string function - The name of the function that was called -
number line - Line number in the file -
number column - Column in file
Example: Function application
let stackInfo = fcf.parseStack(new Error());
console.log(stackInfo);
Output:
[
{
function: 'Object.test',
line: '13',
column: '36',
file: '/home/user/application/parseStack.js'
},
{
function: 'fcf.Actions.',
line: '615',
column: '26',
file: '/home/user/application/node_modules/fcf-framework-unitest/unitest.js'
},
{
function: 'fcf.Actions._execute',
line: '3125',
column: '24',
file: '/home/user/application/node_modules/fcf-framework-core/fcf.js'
},
{
function: 'fcf.Actions.then',
line: '2575',
column: '16',
file: '/home/user/application/node_modules/fcf-framework-core/fcf.js'
},
...