Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JS Object representation of a stack frame.

License

NotificationsYou must be signed in to change notification settings

stacktracejs/stackframe

Repository files navigation

JS Object representation of a stack frame

Build StatusCoverage StatusGitHub licensedependenciesgzip sizemodule formatcode of conduct

Underlies functionality of other modules withinstacktrace.js.

Written to closely resemble StackFrame representations inGecko andV8

Usage

// 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'

Browser Support

Sauce Test Status

Installation

npm install stackframebower install stackframehttps://raw.githubusercontent.com/stacktracejs/stackframe/master/dist/stackframe.min.js

About

JS Object representation of a stack frame.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors9


[8]ページ先頭

©2009-2025 Movatter.jp