tools-data-providers

Home > @lukso/data-provider-urlresolver > UrlConverter

UrlConverter class

It will relatively append pathname or hostname to the desination URL

Signature:

declare class UrlConverter 

Example

destination=https://some.api.gateway/something/ipfs
url=ipfs://QmSomeHash
output=https://some.api.gateway/something/ipfs/QmSomeHash

destination=https://some.api.gateway/something/ipfs
url=https://something.com/somewhere
output=https://some.api.gateway/something/ipfs/somewhere

Constructors

Constructor Modifiers Description
(constructor)(destination, match)   Constructs a new instance of the UrlConverter class

Properties

Property Modifiers Type Description
destination protected string  
match? protected RegExp | string (Optional)

Methods

Method Modifiers Description
resolveUrl(_match, url)