stack-generator
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -1,2 +0,2 @@ | ||
!function(t,e){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],e):"object"==typeof exports?module.exports=e():t.StackFrame=e()}(this,function(){"use strict";function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],i=["fileName","functionName","source"],o=r.concat(n,i,["args"]);function a(e){if(e)for(var r=0;r<o.length;r++)void 0!==e[o[r]]&&this["set"+t(o[r])](e[o[r]])}a.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof a)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new a(t)}},toString:function(){var t=this.getFileName()||"",e=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?t?"[eval] ("+t+":"+e+":"+r+")":"[eval]:"+e+":"+r:n?n+" ("+t+":"+e+":"+r+")":t+":"+e+":"+r}},a.fromString=function(t){var e=t.indexOf("("),r=t.lastIndexOf(")"),n=t.substring(0,e),i=t.substring(e+1,r).split(","),o=t.substring(r+1);if(0===o.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),u=s[1],c=s[2],f=s[3];return new a({functionName:n,args:i||void 0,fileName:u,lineNumber:c||void 0,columnNumber:f||void 0})};for(var s=0;s<r.length;s++)a.prototype["get"+t(r[s])]=e(r[s]),a.prototype["set"+t(r[s])]=function(t){return function(e){this[t]=Boolean(e)}}(r[s]);for(var u=0;u<n.length;u++)a.prototype["get"+t(n[u])]=e(n[u]),a.prototype["set"+t(n[u])]=function(t){return function(e){if(r=e,isNaN(parseFloat(r))||!isFinite(r))throw new TypeError(t+" must be a Number");var r;this[t]=Number(e)}}(n[u]);for(var c=0;c<i.length;c++)a.prototype["get"+t(i[c])]=e(i[c]),a.prototype["set"+t(i[c])]=function(t){return function(e){this[t]=String(e)}}(i[c]);return a}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("stack-generator",["stackframe"],e):"object"==typeof exports?module.exports=e(require("stackframe")):t.StackGenerator=e(t.StackFrame)}(this,function(t){return{backtrace:function(e){var r=[],n=10;"object"==typeof e&&"number"==typeof e.maxStackSize&&(n=e.maxStackSize);for(var i=arguments.callee;i&&r.length<n&&i.arguments;){for(var o=new Array(i.arguments.length),a=0;a<o.length;++a)o[a]=i.arguments[a];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?r.push(new t({functionName:RegExp.$1||void 0,args:o})):r.push(new t({args:o}));try{i=i.caller}catch(t){break}}return r}}}); | ||
!function(t,e){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],e):"object"==typeof exports?module.exports=e():t.StackFrame=e()}(this,function(){"use strict";function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],i=["fileName","functionName","source"],o=r.concat(n,i,["args"],["evalOrigin"]);function a(e){if(e)for(var r=0;r<o.length;r++)void 0!==e[o[r]]&&this["set"+t(o[r])](e[o[r]])}a.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof a)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new a(t)}},toString:function(){var t=this.getFileName()||"",e=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?t?"[eval] ("+t+":"+e+":"+r+")":"[eval]:"+e+":"+r:n?n+" ("+t+":"+e+":"+r+")":t+":"+e+":"+r}},a.fromString=function(t){var e=t.indexOf("("),r=t.lastIndexOf(")"),n=t.substring(0,e),i=t.substring(e+1,r).split(","),o=t.substring(r+1);if(0===o.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),u=s[1],c=s[2],f=s[3];return new a({functionName:n,args:i||void 0,fileName:u,lineNumber:c||void 0,columnNumber:f||void 0})};for(var s=0;s<r.length;s++)a.prototype["get"+t(r[s])]=e(r[s]),a.prototype["set"+t(r[s])]=function(t){return function(e){this[t]=Boolean(e)}}(r[s]);for(var u=0;u<n.length;u++)a.prototype["get"+t(n[u])]=e(n[u]),a.prototype["set"+t(n[u])]=function(t){return function(e){if(r=e,isNaN(parseFloat(r))||!isFinite(r))throw new TypeError(t+" must be a Number");var r;this[t]=Number(e)}}(n[u]);for(var c=0;c<i.length;c++)a.prototype["get"+t(i[c])]=e(i[c]),a.prototype["set"+t(i[c])]=function(t){return function(e){this[t]=String(e)}}(i[c]);return a}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("stack-generator",["stackframe"],e):"object"==typeof exports?module.exports=e(require("stackframe")):t.StackGenerator=e(t.StackFrame)}(this,function(t){return{backtrace:function(e){var r=[],n=10;"object"==typeof e&&"number"==typeof e.maxStackSize&&(n=e.maxStackSize);for(var i=arguments.callee;i&&r.length<n&&i.arguments;){for(var o=new Array(i.arguments.length),a=0;a<o.length;++a)o[a]=i.arguments[a];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?r.push(new t({functionName:RegExp.$1||void 0,args:o})):r.push(new t({args:o}));try{i=i.caller}catch(t){break}}return r}}}); | ||
//# sourceMappingURL=stack-generator.min.js.map |
@@ -68,5 +68,5 @@ module.exports = function(config) { | ||
}; | ||
config.set({ | ||
basePath: '', | ||
concurrency: 3, | ||
frameworks: ['jasmine'], | ||
@@ -82,5 +82,5 @@ files: [ | ||
port: 9876, | ||
colors: true, | ||
colors: false, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
autoWatch: false, | ||
browserDisconnectTimeout: 10000, | ||
@@ -92,7 +92,7 @@ browserDisconnectTolerance: 1, | ||
testName: 'stack-generator unit tests', | ||
commandTimeout: 600, | ||
idleTimeout: 600, | ||
recordScreenshots: false, | ||
connectOptions: { | ||
port: 5757, | ||
logfile: 'sauce_connect.log' | ||
} | ||
recordVideo: false, | ||
retryLimit: 3 | ||
}, | ||
@@ -107,3 +107,6 @@ customLaunchers: customLaunchers, | ||
type: 'lcov', | ||
dir: 'coverage' | ||
dir: 'coverage', | ||
subdir: function(browser) { | ||
return browser.toLowerCase().split(/[ /-]/)[0]; | ||
} | ||
}, | ||
@@ -110,0 +113,0 @@ singleRun: true |
@@ -12,3 +12,2 @@ module.exports = function (config) { | ||
], | ||
reporters: ['spec'], | ||
port: 9876, | ||
@@ -19,3 +18,3 @@ colors: true, | ||
customLaunchers: { | ||
Chrome_Travis: { | ||
Chrome_No_Sandbox: { | ||
base: 'Chrome', | ||
@@ -26,4 +25,15 @@ flags: ['--no-sandbox'] | ||
browsers: ['PhantomJS'], | ||
reporters: ['spec', 'saucelabs', 'coverage', 'coveralls'], | ||
preprocessors: { | ||
'stack-generator.js': 'coverage' | ||
}, | ||
coverageReporter: { | ||
type: 'lcov', | ||
dir: 'coverage', | ||
subdir: function(browser) { | ||
return browser.toLowerCase().split(/[ /-]/)[0]; | ||
} | ||
}, | ||
singleRun: false | ||
}); | ||
}; |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"license": "MIT", | ||
@@ -23,20 +23,20 @@ "keywords": [ | ||
"dependencies": { | ||
"stackframe": "^1.1.1" | ||
"stackframe": "^1.3.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.8.0", | ||
"jasmine": "^3.5.0", | ||
"jasmine-core": "^3.5.0", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.1", | ||
"eslint": "^8.17.0", | ||
"jasmine": "^4.1.0", | ||
"jasmine-core": "^4.1.1", | ||
"karma": "^6.3.20", | ||
"karma-chrome-launcher": "^3.1.1", | ||
"karma-coverage": "^2.2.0", | ||
"karma-coveralls": "^2.1.0", | ||
"karma-firefox-launcher": "^1.2.0", | ||
"karma-firefox-launcher": "^2.1.2", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-jasmine": "^1.1.2", | ||
"karma-jasmine": "^4.0.2", | ||
"karma-opera-launcher": "^1.0.0", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"karma-safari-launcher": "^1.0.0", | ||
"karma-sauce-launcher": "^2.0.2", | ||
"karma-spec-reporter": "0.0.32", | ||
"karma-sauce-launcher": "^4.3.6", | ||
"karma-spec-reporter": "^0.0.34", | ||
"uglify-es": "^3.3.9" | ||
@@ -51,3 +51,3 @@ }, | ||
"test": "karma start karma.conf.js --single-run", | ||
"test-pr": "karma start karma.conf.js --single-run --browsers Firefox,Chrome_Travis", | ||
"test-pr": "karma start karma.conf.js --single-run --browsers Firefox,Chrome_No_Sandbox", | ||
"test-ci": "karma start karma.conf.ci.js --single-run", | ||
@@ -54,0 +54,0 @@ "prepare": "cp stack-generator.js dist/ && uglifyjs node_modules/stackframe/stackframe.js stack-generator.js -o dist/stack-generator.min.js --compress --mangle --source-map \"url=stack-generator.min.js.map\"" |
stack-generator | ||
=============== | ||
[![Build Status](https://travis-ci.org/stacktracejs/stack-generator.svg?branch=master)](https://travis-ci.org/stacktracejs/stack-generator) [![Coverage Status](https://img.shields.io/coveralls/stacktracejs/stack-generator.svg)](https://coveralls.io/r/stacktracejs/stack-generator) [![GitHub license](https://img.shields.io/github/license/stacktracejs/stack-generator.svg)](https://opensource.org/licenses/MIT) | ||
[![Build Status](https://img.shields.io/github/workflow/status/stacktracejs/stack-generator/Continuous%20Integration/master?logo=github&style=flat-square)](https://github.com/stacktracejs/stack-generator/actions?query=workflow%3AContinuous+Integration+branch%3Amaster) | ||
[![Coverage Status](https://img.shields.io/coveralls/stacktracejs/stack-generator.svg?style=flat-square)](https://coveralls.io/r/stacktracejs/stack-generator?branch=master) | ||
[![GitHub license](https://img.shields.io/github/license/stacktracejs/stack-generator.svg?style=flat-square)](https://opensource.org/licenses/MIT) | ||
[![dependencies](https://img.shields.io/badge/dependencies-1-green.svg?style=flat-square)](https://github.com/stacktracejs/stack-generator/releases) | ||
[![module format](https://img.shields.io/badge/module%20format-umd-lightgrey.svg?style=flat-square&colorB=ff69b4)](https://github.com/stacktracejs/stack-generator/releases) | ||
[![code of conduct](https://img.shields.io/badge/code%20of-conduct-lightgrey.svg?style=flat-square&colorB=ff69b4)](http://todogroup.org/opencodeofconduct/#stacktrace.js/me@eriwen.com) | ||
Generate artificial backtrace by walking arguments.callee.caller chain. **Works everywhere except strict-mode**. | ||
Generate artificial backtrace by walking arguments.callee.caller chain. **Works everywhere except [strict-mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)**. | ||
@@ -26,4 +31,1 @@ ## Usage | ||
Want to be listed as a *Contributor*? Start with the [Contributing Guide](CONTRIBUTING.md)! | ||
## License | ||
This project is licensed to the [Public Domain](http://unlicense.org) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26158
17
289
31
Updatedstackframe@^1.3.0