diagnostics.js
function enabled(namespace) {
  var async = [];

  for (var i = 0; i < adapters.length; i++) {
    if (adapters[i].async) {
      async.push(adapters[i]);
      continue;
    }

    if (adapters[i](namespace)) return true;
  }

  if (!async.length) return false;

  //
  // Now that we know that we Async functions, we know we run in an ES6
  // environment and can use all the API's that they offer, in this case
  // we want to return a Promise so that we can `await` in React-Native
  // for an async adapter.
  //
  return new Promise(function pinky(resolve) {
    Promise.all(
      async.map(function prebind(fn) {
        return fn(namespace);
      })
    ).then(function resolved(values) {
      resolve(values.some(Boolean));
    });
  });
}
function enabled(namespace) {
  var async = [];

  for (var i = 0; i < adapters.length; i++) {
    if (adapters[i].async) {
      async.push(adapters[i]);
      continue;
    }

    if (adapters[i](namespace)) return true;
  }

  if (!async.length) return false;

  //
  // Now that we know that we Async functions, we know we run in an ES6
  // environment and can use all the API's that they offer, in this case
  // we want to return a Promise so that we can `await` in React-Native
  // for an async adapter.
  //
  return new Promise(function pinky(resolve) {
    Promise.all(
      async.map(function prebind(fn) {
        return fn(namespace);
      })
    ).then(function resolved(values) {
      resolve(values.some(Boolean));
    });
  });
}
function enabled ( namespace ) { var async = [ ] ; for ( var i = 0 ; i < adapters . length ; i ++ ) { if ( adapters [ i ] . async ) { async . push ( adapters [ i ] ) ; continue ; } if ( adapters [ i ] ( namespace ) ) return true ; } if ( ! async . length ) return false ; // // Now that we know that we Async functions, we know we run in an ES6 // environment and can use all the API's that they offer, in this case // we want to return a Promise so that we can `await` in React-Native // for an async adapter. // return new Promise ( function pinky ( resolve ) { Promise . all ( async . map ( function prebind ( fn ) { return fn ( namespace ) ; } ) ) . then ( function resolved ( values ) { resolve ( values . some ( Boolean ) ) ; } ) ; } ) ; }
Check if the namespace is allowed by any of our adapters.

@param {String} namespace The namespace that needs to be enabled
@returns {Boolean|Promise} Indication if the namespace is enabled by our adapters.
@public
Check if the namespace is allowed by any of our adapters .