@likecoin/epub-ts
    Preparing search index...

    Class Resources

    Handle Package Resources

    Index

    Constructors

    Properties

    cssUrls: string[]
    replacementUrls: string[]
    settings: {
        archive: Archive;
        replacements: string;
        request: RequestFunction;
        resolver: (href: string, absolute?: boolean) => string;
    }
    urls: string[]

    Methods

    • Create a url to a resource

      Parameters

      • url: string

      Returns Promise<string>

      Promise resolves with url string

    • Get a URL for a resource

      Parameters

      • path: string

      Returns Promise<string> | undefined

      url

    • Resolve all resources URLs relative to an absolute URL

      Parameters

      • absolute: string

        to be resolved to

      • Optionalresolver: (href: string, absolute?: boolean) => string

      Returns string[]

      array with relative Urls

    • Create blob urls for all the assets

      Returns Promise<string[]>

      returns replacement urls

    • Substitute urls in content, with replacements, relative to a url if provided

      Parameters

      • content: string
      • Optionalurl: string

        url to resolve to

      Returns string

      content with urls substituted