open-index/open-npm huggingface dataset:
npm package: @gtraldi/react-native-web-poc
Description: Lib for testing react-native-web
Author: Gabriel-Traldi
Latest version: 3.0.2

# react-native-web-poc

Lib for testing react-native-web

## Installation

```sh
npm install react-native-web-poc
```

## Usage

```js
import { multiply } from 'react-native-web-poc';

// ...

const result = await multiply(3, 7);
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @gtramontin/discord-commands
Description: An easy way to create discord.js commands
Author: Gustavo Tramontin
Latest version: 1.1.0

# Discord-Commands

## How to install
`npm i @gtramontin/discord-commands`

## How to use it

### First Import Discord-Commands
```
const Discord = require("discord.js");
const client = new Discord.Client();

const DiscordCommands = require('@gtramontin/discord-commands')
```

### Instance the class
The first parameter is the prefix and the second is the instace of Discord.Client
```
const bot = new DiscordCommands.bot('!', client)
```

### Create Your First Command
the first parameter is command name and the second is a callback function with message as parameter
```
bot.command('ping', async msg => {
    await msg.channel.send('pong 🏓')
})
```
![Screenshot 1](/screenshot-1.png)


### You Can Use Parameters

```
bot.command('say-my-name', async (msg, name, lastName) => {
    await msg.channel.send(`Hello ${name} ${lastName}`)
})
```
![Screenshot 1](/screenshot-2.png)

### Empty Commnad Will Be Executed On Each Message
This is an example of an capslock spam filter

```
bot.command('', async msg => {
    const message = msg.content

    const numberOfUppercases = message.split('').reduce((total, current) => {

        if (current === current.toUpperCase()) {
            return total + 1
        }
        return total
    }, 0)


    const maxPercentageOfUppercase = 0.8 // 80%

    if (numberOfUppercases / message.length >= maxPercentageOfUppercase) {
        await msg.delete({
            timeout: 500    
        })
        await msg.channel.send(`${msg.author.toString()} this is spam!`)
    }
})
```

### There Is Some Options

#### 1. acceptBot
The bot will not ignore bot messages 
```
const bot = new DiscordCommands.bot('!', client, {
    acceptBot: true,
})
```

#### 2. quotesAsOneArg: quotes(""), will be interpreted as one argument
``` 
const bot = new DiscordCommands.bot('!', client, {
    quotesAsOneArg: true
})
```
In this example the bot show the first two parameters separated by ":"
![Quotes example](screenshot-3.png)
npm package: @gtramontina.com/bun-html-live-reload
Description: HTML live reload for Bun
Latest version: 1.0.1

<h1>
    <img src="https://bun.sh/logo.svg" width="30" alt="Bun Logo"> Bun HTML Live Reload
</h1>

## Getting Started

### Install

```sh
bun add -d @gtramontina.com/bun-html-live-reload
```

### Usage

Using the following as a regular Bun server as a starting point:

```ts
// index.ts

Bun.serve({
    fetch: () => {
        return new Response("<div>hello world!</div>", {
            headers: { "Content-Type": "text/html" },
        });
    },
    port: 8888,
});
```

Import `htmlLiveReload` and wrap your server with it:

```ts
// index.ts

import { htmlLiveReload } from "@gtramontina.com/bun-html-live-reload";

Bun.serve(
    htmlLiveReload({
        fetch: () => {
            return new Response("<div>hello world!</div>", {
                headers: { "Content-Type": "text/html" },
            });
        },
        port: 8888,
    }),
);
```

Running the server with [`bun --hot index.ts`](https://bun.sh/docs/runtime/hot#hot-mode) will now force a reload of the current page whenever Bun `--hot` detects a change.
It will also force a reload of the stylesheets when a change to a `text/css` file is detected.
For an example, take a look at the [example](./example) directory and run `bun run:example`.

## Options

### `watchPath`

Bun HTML Live Reload will always force a reload when running it `--hot`.
In order to have a more fine-grained control over the files not detected by Bun's `--hot` mode, the `watchPath` option can be passed to `htmlLiveReload` as such:

```ts
// index.ts

import { htmlLiveReload } from "@gtramontina.com/bun-html-live-reload";

Bun.serve(
    htmlLiveReload(
        { /* server options */ },
        {
            watchPath: path.resolve(import.meta.dir, "src"),
        }
    ),
);
```

### `buildConfig`

If your setup makes use of [`Bun.build()`](https://bun.sh/docs/bundler), you can forward the settings to `htmlLiveReload` via the `buildConfig` option:

```ts
// index.ts

import { htmlLiveReload } from "@gtramontina.com/bun-html-live-reload";

Bun.serve(
    htmlLiveReload(
        { /* server options */ },
        {
            buildConfig: {
                entrypoints: ['./index.tsx'],
                outdir: './build',
            },
        }
    ),
);
```