1.0.2 • Published 1 year ago

mw-url v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

mw-url

import getUrl from "mw-url"

//returns the window.location as string
getUrl()

//returns https://exemple.com
getUrl("https://exemple.com")

//returns the window.location with path /home
getUrl(undefined, "/home")

//returns https://exemple.com/home
getUrl("https://exemple.com", "/home")


//returns the window.location with path /home and search params
getUrl(undefined, "/home", {
    user: "admin",
    password: "1234",
})

//returns https://exemple.com/login?user=admin&password=1234
getUrl("https://exemple.com", "/login", {
    user: "admin",
    password: "1234",
})
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago