open-index/open-npm huggingface dataset:
npm package: @joe-sh/pnpm-api-adapters
Description: This package provides sample api adapters for the [JSONPlaceholder](https://jsonplaceholder.typicode.com/)  website that work with two different http libraries: [`axios`](https://www.npmjs.com/package/axios) and [`node-fetch`](https://www.npmjs.com/packag
Latest version: 0.0.5

# Example API Adapters Package

This package provides sample api adapters for the [JSONPlaceholder](https://jsonplaceholder.typicode.com/)  website that work with two different http libraries: [`axios`](https://www.npmjs.com/package/axios)
and [`node-fetch`](https://www.npmjs.com/package/node-fetch).

## Installation
```sh
pnpm i @joe-sh/pnpm-api-adapters
```

## `axios` Usage
When using the `axios` adapters, you must also install `axios`.
```sh
pnpm i axios
```

```js
const adapter = require('@joe-sh/pnpm-api-adapters/main.axios.js');
adapter('todos/1').then((resp) => console.log(resp));
```

## `node-fetch` Usage
When using the `node-fetch` adapters, you must also install `node-fetch`.
```sh
pnpm i node-fetch
```

```js
const adapter = require('@joe-sh/pnpm-api-adapters/main.fetch.js');
adapter('todos/1').then((resp) => console.log(resp));
```
npm package: @joe-sh/pnpm-api-adapters-todos
Description: This package uses the `axios` api adapter. It doesn't do much since it's a simple example, but in the real world this could provide a simpler interface for what the bare api adapter does.
Latest version: 0.0.4

# Example Package For Loading Todos using JSONPlaceholder API Adapters

This package uses the `axios` api adapter. It doesn't do much since it's a simple example, but in
the real world this could provide a simpler interface for what the bare api adapter does.

## Installation
```sh
pnpm i @joe-sh/pnpm-api-adapters-todos
```

## Usage
```js
const loadTodos = require('@joe-sh/pnpm-api-adapters-todos');
loadTodos().then((data) => console.log(data));

// Optionally load a single todo by passing its ID
loadTodos(2).then((data) => console.log(data));
```