fetch.js.flow 595 B

1234567891011121314151617
  1. /**
  2. * Copyright (c) 2013-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @providesModule fetch
  8. */
  9. 'use strict'; // This hopefully supports the React Native case, which is already bringing along
  10. // its own fetch polyfill. That should exist on `global`. If that doesn't exist
  11. // then we'll try to polyfill, which might not work correctly in all environments.
  12. if (global.fetch) {
  13. module.exports = global.fetch.bind(global);
  14. } else {
  15. module.exports = require("isomorphic-fetch");
  16. }