Skip to content

Commit 98a0489

Browse files
klapecfb55
authored andcommitted
Use Object.keys as Object.values is not supported in node<7
Object.values was introduced in 138b101 and it is not supported in node.js until version 7, so it's a mismatch with what's declared in the `engines` section of package.json (node >= 6).
1 parent 26e0d01 commit 98a0489

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stringify.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ const actionTypes: { [key: string]: string } = {
1111
};
1212

1313
const charsToEscape = new Set([
14-
...Object.values(actionTypes).filter(Boolean),
14+
...Object.keys(actionTypes)
15+
.map((typeKey) => actionTypes[typeKey])
16+
.filter(Boolean),
1517
":",
1618
"[",
1719
"]",

0 commit comments

Comments
 (0)