Fetch headers polyfill
Packed with latest and newest method from the spec: iterator, entries, keys, values, and support of for...of
const Headers =header ='accept' 'application/json''accept' 'text/plain'
- WeakMap for private properties
- Symbol.iterator and Generators* for iteration
- vanilla ecmascript 6
- no transpiler
- no coffeescript or typescript
Up to date node version can just use this as is. (tested in v6.5.0)
Browsers should run this through closer-compiler, babel, Babili, browserify, webpack or equivalent.
Browsers need to include a polyfill for WeakMap if necessary.
Optional for those who want es5 version and don't have the time or effort to compile can use the prebuilt version
var Headers =