React Steersman URL
Tiny and Fast URL utils
Usage
URI
interface URI protocol // returns protocol username // returns username if exists otherwise false password // returns password if exists otherwise false hostname // returns hostname port // returns port if exists otherwise false host // returns host origin // returns origin path // returns path pathParts // returns path parts query // returns query queryParams // returns query as object hash // returns hash // converts URI instance to string // converts URI instance to Object const uri = URI;console;
Pattern
interface Pattern static : Pattern : string : object|null const compiled = Pattern;const userId = 4520;const url = compiled;console // /user/4520const params = compiled;console // { userId: 4520 }
License
License The MIT License Copyright (c) 2017-2018 Ivan Zakharchanka