2.0.2 • Published 5 months ago

@saekitominaga/closest-html-page v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 months ago

Get the data of the HTML page of the nearest ancestor hierarchy

npm version test status

Demo

Examples

import ClosestHTMLPage from '@saekitominaga/closest-html-page';

const closestHTMLPage = new ClosestHTMLPage({
  maxFetchCount: 3,
  fetchOptions: {
    redirect: 'error',
  },
  mimeTypes: ['text/html'],
});

await closestHTMLPage.fetch('https://example.com/path/to/file');

const url = closestHTMLPage.getUrl();
const title = closestHTMLPage.getTitle();

Constructor

new ClosestHTMLPage(options?: Option)

Parameters

Option

interface Option {
  maxFetchCount?: number;
  fetchOptions?: RequestInit;
  mimeTypes?: DOMParserSupportedType[];
}

Methods

2.0.2

5 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago