Javascript create querystring ES6 version

Date: 2019-04-12
let url = "http://test.com/";
const c = encodeURIComponent;
const cv = v => v && v.toISOString ? v.toISOString() : v;
url += "?" + Object.keys(data).map(k => `${c(k)}=${c(cv(data[k]))}`).join("&");
20810cookie-checkJavascript create querystring ES6 version