1
0
Fork 0
arangodb/js/node/node_modules/error-stack-parser/node_modules/stackframe
Alan Plum 40aff3fdcd Upgrade JS deps (#8773)
* Make jsunity hash function avoid recursion

This guards against traversals of recursive data structures causing a stack overflow. This is crucial when using assertEqual with unknown inputs.

* Update deps

accepts: 1.3.4 -> 1.3.5
ansi_up: 2.0.2 -> 4.0.3
content-disposition: 0.5.2 -> 0.5.3
dedent: 0.6.0 -> 0.7.0
error-stack-parser: 1.3.6 -> 2.0.2
eslint: 2.13.1 -> 5.16.0
eslint-config-semistandard: 6.0.2 -> removed
eslint-config-standard: 5.3.1 -> removed
eslint-plugin-promise: 1.3.2 -> removed
eslint-plugin-standard: 1.3.2 -> removed
highlight.js: 9.12.0 -> 9.15.6
http-errors: 1.6.2 -> 1.7.2
iconv-lite: 0.4.19 -> 0.4.24
joi: 9.2.0 -> 14.3.1
joi-to-json-schema: 2.3.0 -> 4.0.1
js-yaml: 3.10.0 -> 3.13.1
marked: 0.3.9 -> 0.6.2
mime-types: 2.1.12 -> 2.1.22
mocha: 2.5.3 -> 6.1.3
qs: 6.5.1 -> 6.7.0
semver: 5.4.1 -> 6.0.0
statuses: 1.4.0 -> 1.5.0
timezone: 1.0.13 -> 1.0.22
type-is: 1.6.15 -> 1.6.16
underscore: 1.8.3 -> 1.9.1

* Inline eslint semistandard config

The eslint standard config has become extremely opinionated and incompatible with the existing coding style. This subset matches the existing coding style most closely. In the future we should migrate to an autoformatter like prettier and avoid this problem altogether.

* Linting

* Fix mocha runner

* New joi has additional property
2019-04-17 13:36:26 +02:00
..
dist Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
.jscsrc Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
.jshintrc Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
.npmignore Don't re-invent the wheel. 2015-02-03 11:56:37 +01:00
CHANGELOG.md Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
CONTRIBUTING.md Update npm deps (semver-minor only) 2015-12-15 23:48:38 +01:00
LICENSE Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
README.md Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
bower.json Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
component.json Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
gulpfile.js Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
karma.conf.ci.js Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
karma.conf.js Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
package.json Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
stackframe-tests.ts Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
stackframe.d.ts Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00
stackframe.js Upgrade JS deps (#8773) 2019-04-17 13:36:26 +02:00

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