1
0
Fork 0
arangodb/js/node/node_modules/error-stack-parser/node_modules/stackframe
Alan Plum 501f5a3f51 Removed unused modules. 2015-04-10 00:33:47 +02:00
..
dist
.jshintrc
.npmignore
.nvmrc
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
bower.json
karma.conf.ci.js
karma.conf.js
package.json Removed unused modules. 2015-04-10 00:33:47 +02:00
stackframe.js

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);

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.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