From 98a048911015ed06ca34832aab0a5325114c0db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20K=C5=82apec=CC=81?= Date: Sun, 4 Oct 2020 21:17:46 +0200 Subject: [PATCH] Use Object.keys as Object.values is not supported in node<7 Object.values was introduced in 138b1019f1fb2d58c0ee8a1f8f92c31573f36953 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). --- src/stringify.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stringify.ts b/src/stringify.ts index 68694421..b60b8cfe 100644 --- a/src/stringify.ts +++ b/src/stringify.ts @@ -11,7 +11,9 @@ const actionTypes: { [key: string]: string } = { }; const charsToEscape = new Set([ - ...Object.values(actionTypes).filter(Boolean), + ...Object.keys(actionTypes) + .map((typeKey) => actionTypes[typeKey]) + .filter(Boolean), ":", "[", "]",