Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

fetch-status

1.0.1 • Public • Published

FetchStatus build status npm version npm downloads

Provides a standard enum for FetchStatus and methods for resolving the status from multiple statuses.

API

FetchStatus

Keys:

  • FetchStatus.NONE
  • FetchStatus.LOADING
  • FetchStatus.LOADED
  • FetchStatus.FAILED

resolveInitialFetchStatus(...statuses: Array<FetchStatusEnum>): FetchStatusEnum

Resolve a single status from multiple statuses for an initial case. Gives priority to FetchStatus.LOADED and FetchStatus.LOADING.

resolveFetchStatus(...statuses: Array<FetchStatusEnum>): FetchStatusEnum

Resolve a single status from multiple statuses for a generic case. Gives priority to FetchStatus.FAILED and FetchStatus.LOADED.

Keywords

none

Install

npm i fetch-status

DownloadsWeekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

6.64 kB

Total Files

5

Last publish

Collaborators

  • avatar