UNPKG

464 BJavaScriptView Raw
1/* global window */
2var Promise = require('unexpected-bluebird');
3var useFullStackTrace = false;
4if (typeof window !== 'undefined' && typeof window.location !== 'undefined') {
5 useFullStackTrace = !!window.location.search.match(
6 /[?&]full-trace=true(?:$|&)/
7 );
8}
9
10if (
11 typeof process !== 'undefined' &&
12 process.env &&
13 process.env.UNEXPECTED_FULL_TRACE
14) {
15 Promise.longStackTraces();
16 useFullStackTrace = true;
17}
18module.exports = useFullStackTrace;