open-index/open-npm huggingface dataset:
npm package: @luispablo/test-helpers
Description: Some small and simple helpers for my unit tests
Author: @luispablo
Latest version: 1.1.0

# test-helpers
Some small and simple helpers for my unit tests

# Content

## DispatchMock

How to use

```javascript
import { DispatchMock } from "@luispablo/test-helpers";

...

const expectedActions = ["set item", "remove item"]; // The redux actions you want dispatched
const dispatch = DispatchMock(assert, expectedActions, true);
// the first param is the tape assert Object
// the last param is optional, if set to true makes an assert.comment with the actions dispatched
```

## FetcherMock

This component is a function that works as the new fetch API function, so when your code calls it as ```fetcher("url")``` it will return a promise that resolves or reject, based on the params you provide.
So, first do

```javascript
import { FetcherMock } from "@luispablo/test-helpers";
```

And then, for an **HTTP 200** response with a JSON body do

```javascript
const fetcher = FetcherMock({ json: { name: "Tom" } });
```

So, ```fetch("anyURL")``` will resolve a response with a ```json()``` function that returns ```{ name: "Tom" }```.

To resolve the promise, but with different HTTP code do

```javascript
const fetcher = FetcherMock({ status: 404 });
```

This will still resolve when you invoke it, but giving you a response object with the status property in 404.

And finally, if you want it to reject (as in a network error) do

```javascript
const fetcher = FetcherMock({ error: { code: 1, message: "Network error" } });
```

This will fall into the ```catch``` part of the promise, with an **error** param with code 1 and the message shown above.

## LocalStorageMock

This is a HTML 5 window local storage mock, to use in your tests. Just do:

```javascript
import { LocalStorageMock } from "@luispablo/test-helpers";

...

// and then
const storage = LocalStorageMock();
// and you're done!
```
npm package: @luispittagros/nuxt-ssr-redis-cache
Description: Blazing Fast SSR page renderings using Redis.
Author: Luís Pitta Grós
Latest version: 1.1.5

<h1 align="center"> Nuxt SSR Redis Cache</h1>

<p align="center">:rocket: Blazing Fast Nuxt Server Side Rendering using Redis. </p>

<p align="center">:heart: Easily improve your NuxtJS application performance.</p>

## Setup

```
npm install @luispittagros/nuxt-ssr-redis-cache --save
```

## Usage

In `nuxt.config.js`:

```js
modules: [
   [
      '@luispittagros/nuxt-ssr-redis-cache',
      {
        enabled: true,
        client: {
          socket: {
            host:  '127.0.0.1',
            port: 6379,
          },
          password: null,
        },
        paths: [/^\/$/, '/articles/'], // If empty or "/" is set all pages will be cached
        ttl: 60 * 60, // 1 hour
        cacheCleanEndpoint: {
          enabled: false, 
          path: '/ssr-redis-cache',
          cors: '*',
        },
      }
    ]
],
```

or

```js
  modules: ['@luispittagros/nuxt-ssr-redis-cache'],
  ssrRedisCache: {
    enabled: true,
    client: {
      socket: {
        host: '127.0.0.1',
        port: 6379,
      },
      password: null,
    },
    paths: [/^\/$/, '/articles/'], // If empty or "/" is set all pages will be cached
    ttl: 60 * 60, // 1 hour
    cacheCleanEndpoint: {
      enabled: true, 
      path: '/ssr-redis-cache',
      cors: '*',
    }
  },
```

##### Redis Client Configuration

For the client configuration check node-redis for reference [here](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md).

##### Cache Clean Endpoint

Creates an endpoint that cleans cached paths, it's useful when you have content that might change often.

To call the endpoint you must make a POST request to your Nuxt appplication using the path you defined (defaults to '/ssr-redis-cache') with the following JSON request body:

```json
{
   "paths" : [ "/", "/example/" ]
}
```

Use "*" as path to delete all cached pages.

For the CORS options check the express cors middleware options [here](https://expressjs.com/en/resources/middleware/cors.html).

### Cached Pages

Cacheable/Cached pages have the HTTP response header "X-Cache" which has the value "HIT" or "MISS" accordingly.
npm package: @luisrangelc/platzom1
Description: funcion que cambia palabras
Author: Luis Rangel
Latest version: 0.1.1

# Platzom

Platzom es un idioma inventado para el [Curso de Fundamentos de JavaScript](https://platzi.com/js) de [Platzi](https://platzi.com), el mejor lugar de educación online

## Descripción del idioma

- Si la palabra termina con "ar", se le quitan esas dos letras
- Si la palabra inicia con Z, se le añade "pe" al final
- Si la palabra traducida tiene 10 o más letras, se debe partir en dos por la mitad y unir con un guión medio
- Por último, si la palabra original es un palíndromo, ninguna regla anterior cuenta y se devuelve la misma palabra pero intercalando letras mayúsculas y minúsculas

## Instalación

```
npm install @luisrangelc/platzom1
```

## Uso

```
import platzom1 from 'platzom1'

platzom1("Programar") // Program
platzom1("Zorro") // Zorrope
platzom1("Zarpar") // Zarppe
platzom1("abecedario") // abece-dario
platzom1("sometemos") // SoMeTeMoS
```

## Créditos
- [Sacha Lifszyc](https://twitter.com/@slifszyc)

## Licencia

[MIT](https://opensource.org/licenses/MIT)
npm package: @luist18/w3v
Description: w3 validator command line tool
Latest version: 1.0.1

# w3validator-cli

[![npm](https://img.shields.io/npm/v/@luist18/w3v?logo=npm)](https://www.npmjs.com/package/@luist18/w3v)
![GitHub](https://img.shields.io/github/license/luist18/w3validator-cli?color=blue)

Command line tool to help you validate your HTML files through the [w3 validator website](https://validator.w3.org/).

## Installing

Using npm:

```bash
$ npm install -g @luist18/w3v
```

Using yarn:

```bash
$ yarn global add @luist18/w3v
```

## Documentation

Read the [official docs](https://github.com/luist18/w3validator-cli/blob/master/docs/commands.md) for usage and more information.

## Author

[Luís Tavares](https://github.com/luist18)

## License

[MIT](LICENSE)