move urlSearchParamsToObject and global.d.ts to react-sdk
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c000583099
commit
466ecf191a
4 changed files with 42 additions and 1 deletions
|
@ -14,7 +14,11 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import url from "url";
|
||||
import * as url from "url";
|
||||
|
||||
export function urlSearchParamsToObject<T extends {}>(params: URLSearchParams) {
|
||||
return <T>Object.fromEntries([...params.entries()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* If a url has no path component, etc. abbreviate it to just the hostname
|
Loading…
Add table
Add a link
Reference in a new issue