Innovenergy_trunk/frontend/node_modules/error-stack-parser/node_modules/stackframe
Kim 085d7c68ba adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
..
dist adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
.jshintrc adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
.npmignore adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
.nvmrc adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
CHANGELOG.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
CONTRIBUTING.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
LICENSE adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
README.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
bower.json adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
gulpfile.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
karma.conf.ci.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
karma.conf.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
package.json adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
stackframe.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00

README.md

stackframe

JS Object representation of a stack frame

Build Status Coverage Status Code Climate

Underlies functionality of other modules within stacktrace.js.

Written to closely resemble StackFrame representations in Gecko and V8

Usage

// Create StackFrame and set properties
var stackFrame = new StackFrame('funName', ['args'], 'http://localhost:3000/file.js', 1, 3288, 'ORIGINAL_STACK_LINE');

stackFrame.functionName      // => "funName"
stackFrame.setFunctionName('newName')
stackFrame.getFunctionName() // => "newName"

stackFrame.args              // => ["args"]
stackFrame.setArgs([])
stackFrame.getArgs()         // => []

stackFrame.fileName          // => 'http://localhost:3000/file.min.js'
stackFrame.setFileName('http://localhost:3000/file.js')  
stackFrame.getFileName()     // => 'http://localhost:3000/file.js'

stackFrame.lineNumber        // => 1
stackFrame.setLineNumber(325)
stackFrame.getLineNumber()   // => 325

stackFrame.columnNumber      // => 3288
stackFrame.setColumnNumber(20)
stackFrame.getColumnNumber() // => 20

stackFrame.source            // => 'ORIGINAL_STACK_LINE'
stackFrame.setSource('NEW_SOURCE')
stackFrame.getSource()       // => 'NEW_SOURCE'

stackFrame.toString() // => 'funName(args)@http://localhost:3000/file.js:325:20'

Installation

npm install stackframe
bower install stackframe
https://raw.githubusercontent.com/stacktracejs/stackframe/master/dist/stackframe.min.js