open-index/open-npm huggingface dataset:
npm package: @gluons/prettier-config
Description: gluons' personal Prettier config.
Author: Saran Tanpituckpong
Latest version: 3.1.0

# gluons - prettier-config
[![License](https://img.shields.io/badge/license-MIT-97CA00.svg?style=flat-square)](./LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@gluons/prettier-config.svg?style=flat-square)](https://www.npmjs.com/package/@gluons/prettier-config)

[gluons](https://gitlab.com/gluons)' personal [Prettier](https://prettier.io/) config.

## Installation

```bash
npm i -D @gluons/prettier-config
# or
yarn add -D @gluons/prettier-config
```

## Usage

Add this into your `package.json`:

```json
{
  "prettier": "@gluons/prettier-config"
}
```
npm package: @gluons/react-native-fetch-with-timeout
Description: Fetch with timeout for React Native.
Author: Saran Tanpituckpong
Latest version: 0.0.1

# React Native Fetch with Timeout

> Personal usage only. No further support.

[Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) with timeout for [React Native](https://reactnative.dev/).

## Installation

```bash
npm install -S @gluons/react-native-fetch-with-timeout
```

or

```bash
yarn add @gluons/react-native-fetch-with-timeout
```

## Usage

```js
import { Alert } from 'react-native';
import fetchWithTimeout from '@gluons/react-native-fetch-with-timeout';

(async () => {
	try {
		const res = await fetchWithTimeout(
			'https://<request-url>',
			{},
			{
				timeout: 5000 // 5 seconds
			}
		)
	} catch (err) {
		// Thrown "Request Timeout" error after 5 seconds
		Alert.alert('Error', err.toString());
	}
})();
```