electron-fetch
Advanced tools
Comparing version 1.0.0-aplha2 to 1.0.0-aplha3
@@ -911,8 +911,12 @@ import { format, parse, resolve } from 'url'; | ||
function getHeaderPairs(headers, kind) { | ||
const keys = Object.keys(headers[MAP]).sort(); | ||
return keys.map(kind === 'key' ? function (k) { | ||
if (kind === 'key') return Object.keys(headers[MAP]).sort().map(function (k) { | ||
return [k]; | ||
} : function (k) { | ||
return [k, headers.get(k)]; | ||
}); | ||
const pairs = []; | ||
for (let key of Object.keys(headers[MAP]).sort()) { | ||
for (let value of headers[MAP][key]) { | ||
pairs.push([key, value]); | ||
} | ||
} | ||
return pairs; | ||
} | ||
@@ -919,0 +923,0 @@ |
@@ -917,8 +917,12 @@ 'use strict'; | ||
function getHeaderPairs(headers, kind) { | ||
const keys = Object.keys(headers[MAP]).sort(); | ||
return keys.map(kind === 'key' ? function (k) { | ||
if (kind === 'key') return Object.keys(headers[MAP]).sort().map(function (k) { | ||
return [k]; | ||
} : function (k) { | ||
return [k, headers.get(k)]; | ||
}); | ||
const pairs = []; | ||
for (let key of Object.keys(headers[MAP]).sort()) { | ||
for (let value of headers[MAP][key]) { | ||
pairs.push([key, value]); | ||
} | ||
} | ||
return pairs; | ||
} | ||
@@ -925,0 +929,0 @@ |
{ | ||
"name": "electron-fetch", | ||
"version": "1.0.0-aplha2", | ||
"version": "1.0.0-aplha3", | ||
"description": "A light-weight module that brings window.fetch to electron's background process", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
97395
2453