code: function(bs, done) {
          if (
              _.isUndefined(bs.options.get("online")) &&
              _.isUndefined(process.env.TESTING)
          ) {
              require("dns").resolve("www.google.com", function(err) {
                  var online = false;
                  if (err) {
                      bs.debug(
                          "Could not resolve www.google.com, setting {magenta:online: false}"
                      );
                  } else {
                      bs.debug(
                          "Resolved www.google.com, setting {magenta:online: true}"
                      );
                      online = true;
                  }
                  done(null, {
                      options: {
                          online: online
                      }
                  });
              });
          } else {
              done();
          }
      }
docs: Some features require an internet connection.
  If the user did not provide either `true` or `false`
  for the online option, we will attempt to resolve www.google.com
  as a way of determining network connectivity
  @param {BrowserSync} bs
  @param {Function} done