UNPKG
api-problem
Version:
latest (9.0.2)
9.0.2
9.0.1
9.0.0
8.0.0
7.0.4
7.0.3
7.0.2
7.0.1
7.0.0
6.1.4
6.1.3
6.1.2
6.1.1
6.1.0
6.0.1
6.0.0
5.1.2
5.1.1
5.1.0
5.0.1
5.0.0
4.0.0
3.0.0
2.0.3
2.0.2
2.0.1
2.0.0
1.1.0
1.0.0
HTTP Problem Utility
github.com/ahmadnassri/api-problem
ahmadnassri/node-api-problem
api-problem
/
lib
/
polyfill.js
13 lines
(11 loc)
•
252 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
/* istanbul ignore file */
if
(!
Object
.
fromEntries
) {
Object
.
defineProperty
(
Object
,
'fromEntries'
, {
value
(iterable) {
return
[...iterable].
reduce
(
(
obj, [key, val]
) =>
{ obj[key] = val
return
obj }, {}) } }) }