From a204f63e296988c97c76c2c85c49348cc6aeb867 Mon Sep 17 00:00:00 2001 From: Christopher S Plantijn Date: Mon, 4 Jan 2016 11:07:06 -0500 Subject: [PATCH] Show ES6 alternative syntax for importing Some users may be new to using ES6. This change may provide a hint to those who are new to ES6 but would like to maintain as much ES6 syntax as possible. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 270a3e3..e4e8061 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,14 @@ bower install --save isomorphic-fetch es6-promise ## Usage ```js +// If using ES5 require('es6-promise').polyfill(); require('isomorphic-fetch'); +//If using ES6 +import { polyfill } from 'es6-promise'; +import 'isomorphic-fetch'; + fetch('//offline-news-api.herokuapp.com/stories') .then(function(response) { if (response.status >= 400) {