项目原始demo,不改动
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
 
 
 
 
xzx 2ec7739298 [Version] V.3.8 4 年前
..
dist [Version] V.3.8 4 年前
.jscsrc [Version] V.3.8 4 年前
.jshintrc [Version] V.3.8 4 年前
.npmignore [Version] V.3.8 4 年前
CHANGELOG.md [Version] V.3.8 4 年前
CONTRIBUTING.md [Version] V.3.8 4 年前
LICENSE [Version] V.3.8 4 年前
README.md [Version] V.3.8 4 年前
bower.json [Version] V.3.8 4 年前
component.json [Version] V.3.8 4 年前
gulpfile.js [Version] V.3.8 4 年前
karma.conf.ci.js [Version] V.3.8 4 年前
karma.conf.js [Version] V.3.8 4 年前
package.json [Version] V.3.8 4 年前
stackframe-tests.ts [Version] V.3.8 4 年前
stackframe.d.ts [Version] V.3.8 4 年前
stackframe.js [Version] V.3.8 4 年前

README.md

stackframe

JS Object representation of a stack frame

Build Status Coverage Status GitHub license

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({
    functionName: 'funName',
    args: ['args'],
    fileName: 'http://localhost:3000/file.js',
    lineNumber: 1,
    columnNumber: 3288, 
    isEval: true,
    isNative: false,
    source: '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.isEval            // => true
stackFrame.setIsEval(false)
stackFrame.getIsEval()       // => false

stackFrame.isNative            // => false
stackFrame.setIsNative(true)
stackFrame.getIsNative()       // => true

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

Browser Support

Sauce Test Status

Installation

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