open-index/open-npm huggingface dataset:
npm package: @mirochiu/firebase-storage-for-backend
Description: a simple wrapper for firebase storage via firebase-admin
Author: Mirochiu
Latest version: 0.3.16

# @mirochiufirebase-storage-for-backend

## installation

`npm install @mirochiu/firebase-storage-for-backend`

## upgrade

`npm install @mirochiu/firebase-storage-for-backend@latest`

## usage

### cjs

```javascript
const fs = require('node:fs');
const createClient = require('@mirochiu/firebase-storage-for-backend');

// please load your service account key
const serviceAccountKey = require('../serviceAccountKey.json');

// init the client for firebase storage
const client = createClient('<firebase-project-name>.appspot.com', serviceAccountKey);

console.log(client.bucketName);

(async () => {
    // upload to firebase storage
    await client.upload('test.json', fs.readFileSync('./package.json'));

    console.log('upload done');

    // read json from firebase storage
    console.log(await client.getJson('test.json'))
})();
```

### mjs

```javascript
import fs from 'node:fs';
import createClient from '@mirochiu/firebase-storage-for-backend';

// please load your service account key
import serviceAccountKey from './serviceAccountKey.json' assert { type: 'json' };

// init the client for firebase storage
const client = createClient('<firebase-project-name>.appspot.com', serviceAccountKey);

// upload to firebase storage
await client.upload('test.json', fs.readFileSync('./package.json'));
console.log('upload done');

// read json from firebase storage
console.log(await client.getJson('test.json'))
```

## reference

[Bucket API documentation](https://googleapis.dev/nodejs/storage/latest/Bucket.html)
npm package: @miroculus/anaconda-chunks-transfer
Description: Create chunks from a string or buffer for wire-transfer
Author: mjlescano
Latest version: 4.0.0

# Chunks Transfer

This utility prepares a given buffer to be transfered in chunks, probably through
the network. Useful when you want to transfer large files using a custom protocol.

## Usage

You will need to use the library on a server and a client. On the server you will
generate the chunks with the metadata and then send them one by one to the client.

> In this example we will be using the functions `publishToClient` and `onMessageFromServer`
> which should be your custom transfer methods.

e.g.:

**server.js**
```javascript
const { createChunks } = require('@miroculus/anaconda-chunks-transfer')

const content = 'superbigstring....'

const chunks = createChunks({
  content: Buffer.from(content), // Complete buffer you want to transfer
  chunkSize: 12 // maximum amount of bytes of data a chunk should contain
})

chunks.forEach((chunk) => {
  publishToClient(chunk)
})
```

```javascript
const { createReceiver } = require('@miroculus/anaconda-chunks-transfer')

let receiver = null

onMessageFromServer((chunk) => {
  if (!receiver) {
    const { id, total } = chunk
    receiver = createReceiver({ id, total })
  }

  receiver.addChunk(chunk)

  // The message has been completely received
  if (receiver.done()) {
    console.log(receiver.toString())
  }
})
```
npm package: @miroculus/log
Description: Node.js log library
Author: mjlescano
Latest version: 3.1.1

# @miroculus/log

Simple logging library for Node.js intended to be used internally at
[Miroculus](https://miroculus.com/).

## Installation

```
npm i @miroculus/log
```

## Getting Started

By default, the library will log everything to the console, including the log
level:

```javascript
const log = require('@miroculus/log')

log.info('some message')
// [INFO] some message
```

## Logging Levels

The library includes the following logging levels:

1. `critical`
2. `error`
3. `warn`
4. `info`
5. `debug`

And you can enable them using the function `setLevel`, that receives the logging
level you which to enable, and will disable all the levels it has underneath.

e.g.:

```javascript
// This will disable the `info` and `debug` logging levels.
log.setLevel('warn')
```

## Scoped Logging

You can create an scoped logger, which will include the scope when logging it to
the console. e.g.:

```javascript
const { createLog } = require('@miroculus/log')

const log = createLog('my-library')

log.info('another message')
// [INFO][my-library] another message
```

Multiple scopes can also be used:
```javascript
const { createLog } = require('@miroculus/log')

const log = createLog('my-library', 'sub-module')

log.info('another message')
// [INFO][my-library][sub-module] another message
```

## Logging Triggers

If you want to execute some callback everytime a log is emitted, you can listen
to the event `log`, e.g:

```javascript
const log = require('@miroculus/log')

log.on('log', ({ level, scopes, args, time }) => {
  // level === 'error'
  // scopes === []
  // time === Date.now()
  const [err] = args
  // do wathever you like with the logged err object
})

log.error(new Error('some error'))
```

> A more complex example can be found at [`examples/sentry.js`](examples/sentry.js)
> which shows how to do a very simple implementation with Sentry.

## Default console logger

By default, the logger will log everything to the console, but this functionality
can be disabled by running the following on the base logger:

```javascript
const log = require('@miroculus/log')

log.disableDefaultConsoleLogger()

// To re-enable the default listener:
log.enableDefaultConsoleLogger()
```

This is useful to be able to define a custom console logger using the
[Logging Triggers](#logging-triggers), or disable the console logger altogether.
npm package: @miroed/react-show-hide
Description: Simple react component for conditionally showing or hiding components.
Author: Michael Edmond
Latest version: 1.0.1

# @miroed/react-show-hide

[![Build Status](https://img.shields.io/travis/miroed/react-show-hide/master.svg?style=flat)](https://travis-ci.org/miroed/react-show-hide)
[![npm version](https://img.shields.io/npm/v/react-show-hide.svg?style=flat)](https://www.npmjs.com/package/react-show-hide)
[![npm downloads](https://img.shields.io/npm/dm/react-show-hide.svg?style=flat)](https://www.npmjs.com/package/react-show-hide)

Simple react component for conditionally showing or hiding components.

# Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Components](#components)
- [Properties](#properties)

# Installation

`npm install react-show-hide@next --save`

react-show-hide requires **React 16.8.0 or later.**

# Usage

```jsx
import React from "react"
import { Show, Hide } from "@miroed/react-show-hide";
import MyComponent from './components/MyComponent';

function App(props) {
  return (
      <Show when={true}>
        <MyComponent />
      </Show>
      <Hide when={true}>
        <MyComponent alt={true} />
      </Hide>
  );
}
```

# Components

|   Name   | Description                                     |
| :------: | :---------------------------------------------- |
| **Show** | Display children components after condition met |
| **Hide** | Hide children components after condition met    |

# Properties

|         Name          |    Type     | Default | Description                                |
| :-------------------: | :---------: | :-----: | :----------------------------------------- |
|  **[`when`](#when)**  | `{Boolean}` |         | Condition to be met                        |
| **[`after`](#after)** | `{String}`  |         | Delay on when to show component by seconds |

### `when`

Condition to be met. Needs to result in a truthy or falsy statement.<br /><br />

```jsx
<Show when={value.length > 0}>I feel seen 🙌!</Show>
```

In vanilla JS, doing the following works great:

```js
if (value.length) return "I feel seen 🙌!";
```

Doing the same thing using the Logical && Operator, you're returning a falsy
expression and will cause the component after && to be skipped. In the example
below, `0` will be returned by the render method.

```jsx
{
  value.length && <MyComponent />;
}
```

We catch that for you:

```jsx
<Show when={value.length}>I feel seen 🙌!</Show> // result: I feel seen 🙌!
```

### `after`

```jsx
<Show when={value.length} after={600}>I feel seen 🙌!</Show> // shown in 0.6s seconds after condition met
<Hide when={value.length} after={60000}>Gone after 60 seconds 🏎!</Hide> // gone in 60 seconds after condition met
```

Controls the delay on showing the component.