const urlParams = new URLSearchParams(location.search);
urlParams.get(‘token’);
You can just dump the whole url into the URLSearchParams constructor.
boom.
const urlParams = new URLSearchParams(location.search);
urlParams.get(‘token’);
You can just dump the whole url into the URLSearchParams constructor.
boom.