UNPKG

428 BJavaScriptView Raw
1const Promise = require('unexpected-bluebird');
2const utils = require('./utils');
3
4let useFullStackTrace = false;
5if (typeof window !== 'undefined' && typeof window.location !== 'undefined') {
6 useFullStackTrace = !!window.location.search.match(
7 /[?&]full-trace=true(?:$|&)/
8 );
9}
10
11if (utils.getEnv('UNEXPECTED_FULL_TRACE')) {
12 Promise.longStackTraces();
13 useFullStackTrace = true;
14}
15module.exports = useFullStackTrace;