An open API service indexing awesome lists of open source software.

https://github.com/atomgraph/urlbuilder

URLBuilder class for easier composition of URLs in TypeScript/JavaScript
https://github.com/atomgraph/urlbuilder

builder typescript typescript-library uri url

Last synced: 5 days ago
JSON representation

URLBuilder class for easier composition of URLs in TypeScript/JavaScript

Awesome Lists containing this project

README

        

# URLBuilder
URLBuilder class for easier composition of [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) objects in TypeScript/JavaScript

Inspired by JAX-RS [UriBuilder](https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/UriBuilder.html).
This implementation does not support variable templates such as `{var}` as of yet.

## Example

URLBuilder.fromURL("https://atomgraph.com").path("cases").path("nxp-semiconductors").build().toString();

Will return:

https://atomgraph.com/cases/nxp-semiconductors