* Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private
()
| 441 | */ |
| 442 | |
| 443 | function load() { |
| 444 | var r; |
| 445 | try { |
| 446 | return exports.storage.debug; |
| 447 | } catch(e) {} |
| 448 | |
| 449 | // If debug isn't set in LS, and we're in Electron, try to load $DEBUG |
| 450 | if (typeof process !== 'undefined' && 'env' in process) { |
| 451 | return process.env.DEBUG; |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * Enable namespaces listed in `localStorage.debug` initially. |