open-index/open-npm huggingface dataset:
npm package: @regenerate/effect-env
Description: Regenerate effect to access environment variables
Author: David Asensio Cañas
Latest version: 1.0.2

# @regenerate/effect-env

Regenerate effect to access environment variables

## Installation

```bash
# Using yarn
yarn add @regenerate/effect-env

# Using npm
npm i @regenerate/effect-env
```

## Set up

Create a `src/effects/env.js` file in your project with the following content:

```javascript
import createEnvEffect from '@regenerate/effect-env'

export default createEnvEffect()
```

By default `@regenerate/effect-env` will use the variables available in `process.env` but alternatively you can provide any desired variable when creating it:

```javascript
import createEnvEffect from '@regenerate/effect-env'

const env = {
  A_VARIABLE: 'a value',
  ANOTHER_VARIABLE: 'another value'
}

export default createEnvEffect({ env })
```

## Usage

```javascript
function * fetchTodos () {
  const apiBaseUrl = yield env.get('API_BASE_URL')
  // Rest of effects
}
```
npm package: @regenerate/effect-fetch
Description: Regenerate effect to use fetch-like requests
Author: David Asensio Cañas
Latest version: 1.0.2

# @regenerate/effect-fetch

Regenerate effect to use fetch-like requests

## Installation

```bash
# Using yarn
yarn add @regenerate/effect-fetch

# Using npm
npm i @regenerate/effect-fetch
```

## Set up

Create a `src/effects/http.js` file in your project with the following content:

```javascript
import createFetchEffect from '@regenerate/effect-fetch'

// You can use any module that is compliant with the fetch API
import fetch from 'isomorphic-unfetch'

export default createFetchEffect({ fetch })

```

## Usage

It can be used like the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/fetch)

```javascript
function * fetchTodos () {
  const todos = yield http.fetchJson(
    'http://api.url/todos',
    {
      method: 'GET'
      /* fetch options */
    }
  )
  // Rest of effects
}
```
npm package: @regenerate/effect-zustand-store
Description: Regenerate effect to use zustand
Author: David Asensio Cañas
Latest version: 1.0.2

# @regenerate/effect-zustand-store

Regenerate effect to use zustand

## Installation

```bash
# Using yarn
yarn add @regenerate/effect-zustand-store

# Using npm
npm i @regenerate/effect-zustand-store
```
npm package: @regenerate/test-helpers
Description: Test utils to help testing regenerate effect streams
Author: David Asensio Cañas
Latest version: 1.0.2

# @regenerate/test-helpers

Test helpers for regenerate.

```javascript
import { runEffectStreamAgainstExecutionPlan } from '@regenerate/test-helpers'

const { expected, received } = runEffectStreamAgainstExecutionPlan(effectStream, effectExecutionPlan)

expect(expected).toStrictEqual(received)
```