open-index/open-npm huggingface dataset:
npm package: @fjp-npm/request-multiple-urls
Description: Package to fetch JSON data from a collection of url endpoints
Author: fjp@dodion.co.uk
Latest version: 1.0.2

# @fjp-npm/request-multiple-urls

[![npm (scoped)](https://img.shields.io/npm/v/@fjp-npm/request-multiple-urls.svg)](https://www.npmjs.com/package/@fjp-npm/request-multiple-urls)
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@fjp-npm/request-multiple-urls.svg)](https://www.npmjs.com/package/@fjp-npm/request-multiple-urls)


_request-multiple-urls_ is a JavaScript package to fetch JSON data from a collection of url endpoints.

## Installation

```bash
npm install @fjp-npm/request-multiple-urls
```

## Usage

```javascript
const requestMultipleUrls = require('@fjp-npm/request-multiple-urls'); 

const urls = [
    'https://google.com',
    'https://jsonplaceholder.typicode.com/todos/10',
    'https://ft-tech-test-example.s3-eu-west-1.amazonaws.com/ftse-fsi.json'
];

requestMultipleUrls(urls).then(urlContent => { 
  console.log(urlContent);
});
```
The `requestMultipleUrls` function returns an array of objects where each object represents the JSON returned 
from one endpoint. If an endpoint does not return valid JSON then nothing is added to the response array for that 
particular url and a debug message is written to the console.

Type information is included for TypeScript support.

## Contributing
The project is not looking for contributors at this time.

## License
[MIT](https://choosealicense.com/licenses/mit/)

## Developer notes

#### Requirements

The project requires `node` and `npm` that are available from [Node.js](https://nodejs.org/en/) 
and the project has been tested with node version 12.18.1 and npm version 6.14.5.

#### Installation

The project is available on [GitHub](https://github.com/fjp-npm/request-multiple-urls.git) so can be cloned with the command:
```
git clone https://github.com/fjp-npm/request-multiple-urls.git
```
Project dependencies can be installed with the command:
```
npm install
```
[Axios](https://github.com/axios/axios) is the only direct runtime dependency. It was selected as the Promise 
based HTTP client because it is very popular and actively supported. 
It is also has a comprehensive range of features including support for TypeScript. 

#### Build
To compile the TypeScript project use:
```
npm run build
```
To run compiler with file watching use:
```
npm run tsc
```

#### Linting
To trigger linting (ESLint) use:
```
npm run lint
```
To trigger linting (ESLint) and fix issues use:
```
npm run fix
```

#### Tests

Unit tests have been implemented with [Jest](https://jestjs.io/) and can be run with the command:
```
npm run test
```
To run tests with file watching use:
```
npm run tdd
```

#### Documentation
The project uses [TypeDoc](https://typedoc.org/) to generate documentation. 
The documentation can be found in the `docs` folder and is generated by the command:
```
npm run docs
```

#### Publishing
Standard scripts to support npm publishing are also included i.e. ```prepare ```, ```prepublishOnly```,```version```,```preversion``` and ```postversion```