UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

19 lines (18 loc) 425 B
export function encodePathParam(param) { if (param === null) { return "null"; } const typeofParam = typeof param; switch (typeofParam) { case "undefined": return "undefined"; case "string": case "number": case "boolean": break; default: param = String(param); break; } return encodeURIComponent(param); }