- Notifications
You must be signed in to change notification settings - Fork16
JS Object representation of a stack frame.
License
NotificationsYou must be signed in to change notification settings
stacktracejs/stackframe
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Underlies functionality of other modules withinstacktrace.js.
Written to closely resemble StackFrame representations inGecko andV8
// Create StackFrame and set propertiesvarstackFrame=newStackFrame({functionName:'funName',args:['args'],fileName:'http://localhost:3000/file.js',lineNumber:1,columnNumber:3288,isEval:true,isNative:false,source:'ORIGINAL_STACK_LINE'evalOrigin:newStackFrame({functionName:'withinEval',lineNumber:2,columnNumber:43})});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// => 1stackFrame.setLineNumber(325)stackFrame.getLineNumber()// => 325stackFrame.columnNumber// => 3288stackFrame.setColumnNumber(20)stackFrame.getColumnNumber()// => 20stackFrame.source// => 'ORIGINAL_STACK_LINE'stackFrame.setSource('NEW_SOURCE')stackFrame.getSource()// => 'NEW_SOURCE'stackFrame.isEval// => truestackFrame.setIsEval(false)stackFrame.getIsEval()// => falsestackFrame.isNative// => falsestackFrame.setIsNative(true)stackFrame.getIsNative()// => truestackFrame.evalOrigin// => StackFrame({functionName: 'withinEval', lineNumber: ...})stackFrame.setEvalOrigin({functionName:'evalFn',fileName:'anonymous'})stackFrame.getEvalOrigin().getFunctionName()// => 'evalFn'stackFrame.toString()// => 'funName(args)@http://localhost:3000/file.js:325:20'
npm install stackframebower install stackframehttps://raw.githubusercontent.com/stacktracejs/stackframe/master/dist/stackframe.min.jsAbout
JS Object representation of a stack frame.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.