open-index/open-npm huggingface dataset:
npm package: @jaemsnrg/react-components
Description: React, Typescript and Jest component library
Author: James
Latest version: 1.0.1

# React UI Kit boilerplate

The perfect boilerplate to help you to create your own React UI Kit. 

<!-- https://github.com/leandrooriente/react-ui-kit-boilerplate -->

<div>
  <!-- Dependency Status -->
  <a href="https://david-dm.org/leandrooriente/react-ui-kit-boilerplate">
    <img src="https://david-dm.org/leandrooriente/react-ui-kit-boilerplate.svg" alt="Dependency Status" />
  </a>
  <!-- devDependency Status -->
  <a href="https://david-dm.org/leandrooriente/react-ui-kit-boilerplate#info=devDependencies">
    <img src="https://david-dm.org/leandrooriente/react-ui-kit-boilerplate/dev-status.svg" alt="devDependency Status" />
  </a>
</div>

## Live Example

[https://leandrooriente.github.io/react-ui-kit-boilerplate](https://leandrooriente.github.io/react-ui-kit-boilerplate/?selectedKind=Components%2FButton&selectedStory=default&full=0&addons=1&stories=1&panelRight=1&addonPanel=storybooks%2Fstorybook-addon-knobs&knob-Label=Default)

## Features

- [Typescript](https://www.typescriptlang.org)
- Components generators
- Development Environment: [Storybook](https://storybook.js.org/)
- Styles: [Styled Components](https://www.styled-components.com/) with theming configuration
- Lint: [TSLint](https://palantir.github.io/tslint/)
- Tests: [Jest](https://jestjs.io/)

## Quick start

Make sure that you have Node v8 or above installed.

1. Clone this repo using `git clone  git@github.com:leandrooriente/react-ui-kit-boilerplate.git`
2. Move to the appropriate directory: `cd react-ui-kit-boilerplate`.
3. Run `npm ci` in order to install dependencies.
4. At this point you can run `npm run storybook` to see the example Storybook at [http://localhost:6006](http://localhost:6006).

## Creating new components

To add a new component, just run `npm run generate`. This command will generate all the component (Stateless or not) files for you.

## Testing

To test your components run `npm test`.
By default we run tests and lint before any push.

## Deploying storybook

To deploy storybook to Github Pages run `npm run deploy-storybook`.

## License

MIT
npm package: @jaenfigueroa/foxed-utils
Description: Libreria de utilidades
Author: Jaen Figueroa
Latest version: 1.0.3

# Foxed Utils

[![npm-publish-action](https://github.com/jaenfigueroa/foxed-utils/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/jaenfigueroa/foxed-utils/actions/workflows/npm-publish.yml)

## Install

```bash
npm i @jaenfigueroa/foxed-utils
```

## Usage

### CommonJS

En entornos de CommonJS, puedes importar la libreria de la siguiente manera:

```js
const { numberRandom, wordRandom } = require("@jaenfigueroa/foxed-utils");

numberRandom(1, 10); // 8
wordRandom(["Juan", "Pedro", "Maria", "Sofia"]); // 'Pedro'
```

### ES6+

En entornos de ES6 o versiones superiores, puedes importar la libreria de la siguiente manera:

```js
import { numberRandom, wordRandom } from "@jaenfigueroa/foxed-utils";

numberRandom(1, 10); // 4
wordRandom(["Juan", "Pedro", "Maria", "Sofia"]); // 'Sofia'
```
npm package: @jaenfigueroa/utils-random
Description: Libreria para obtener valores aleatorios
Author: Jaen Figueroa
Latest version: 1.0.7

# Utils Random

[![.github/workflows/npm-publish.yml](https://github.com/jaenfigueroa/utils-random/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/jaenfigueroa/utils-random/actions/workflows/npm-publish.yml)

## Install

```bash
npm i @jaenfigueroa/utils-random
```

## Usage

### CommonJS

En entornos de CommonJS, puedes importar la libreria de la siguiente manera:

```js
const { numberRandom, wordRandom } = require("@jaenfigueroa/utils-random");

numberRandom(1, 10); // 8
wordRandom(["Juan", "Pedro", "Maria", "Sofia"]); // 'Pedro'
```

### ES6+

En entornos de ES6 o versiones superiores, puedes importar la libreria de la siguiente manera:

```js
import { numberRandom, wordRandom } from "@jaenfigueroa/utils-random";

numberRandom(1, 10); // 8
wordRandom(["Juan", "Pedro", "Maria", "Sofia"]); // 'Pedro'
```
npm package: @jaensen/timecircles
Description: Time Circles (TC) are a time-dependent display unit for Circles (CRC). This repo contains functions to convert between CRC and TC.
Author: Earth Circle DAO
Latest version: 1.0.5

# Time Circles (TC)
Time Circles (TC) are a time-dependent display unit for [Circles](https://github.com/CirclesUBI/circles-contracts).

The unit is rooted in the daily UBI payout every user receives in CRC and the fixed inflation rate. It normalizes the daily UBI payout to 24 TC regardless of the inflation.

# Usage
```js
import {crcToTc, tcToCrc} from "@jaensen/timecircles";

// Since TC are time-dependent we'll always need a timestamp
const transactionTimestamp = new Date("2022-05-03T04:21:25.000Z");
// The amount in CRC
const transactionCrcAmount = 8.566935185185093;  

// Convert to TC
const tcAmount = crcToTc(transactionTimestamp, transactionCrcAmount);
console.log(`${transactionCrcAmount} CRC are ${tcAmount} TC at ${transactionTimestamp}`);

// Convert back to CRC
const crcAmount = tcToCrc(transactionTimestamp, tcAmount);
console.log(`${crcAmount} TC are ${crcAmount} CRC at ${transactionTimestamp}`);
```
npm package: @jaenster/channels
Description: simple concurrency channel messaging
Author: Jaenster
Latest version: 0.1.2

# Simple channel

Push something in, get something out

```typescript
import {Channel, Client} from '@jaenster/channels'

describe('channel', () => {
    const channel = Channel.factory<string>();

    const arr = [];

    test('can send message', async () => {

        const alice = new ChannelClient(channel);
        const bob = new ChannelClient(channel);

        alice.out('test');
        let sender: ChannelClient<string>;
        bob.on('data', (a, who) => {
            sender = who;
            arr.push(a)
        })

        expect(arr).toHaveLength(0);
        await delay();
        expect(arr).toHaveLength(1);
        expect(sender).toBe(alice);
    });
});
```
npm package: @jaenster/events
Description: events - A nodejs like event system that is fully typed
Author: Jaenster
Latest version: 0.9.8

# EventTS

```typescript
import {EventTS} from "@jaenster/events";

interface Foo {
    on<S = this>(event: "bar", cb: (this: S, a: string) => any);
}

class Foo extends EventTS {
    z: string = '';
}

const foo = new Foo;

foo.on('bar', function () {
    // `this` is typed
    if (this.z.length) {
        // something
    }
})
```
npm package: @jaenster/synchronized
Description: decorator that runs async methods synchronized
Author: Jaenster
Latest version: 0.1.1

# Synchronize

- npm; `npm install @jaenster/synchronized`
- yarn; `yarn add @jaenster/synchronized`
- deno; `import {Synchronized} from 'https://github.com/jaenster/synchronized/raw/master/src/index.ts'`

## Problem
Ever had an async method that should not run twice at the same time?

## Solution
synchronize with a decorator!

## Example

```typescript
import {Synchronized} from "@jaenster/synchronized";

// generate a promise which delays
const delay = ms => new Promise<void>(resolve => setTimeout(resolve, ms)); 

class Worker {
    
    @Synchronized()
    async runTask(id: number) {
        // Do something
        
        // simulate some work
        console.log(`task #${id} started`);
        await delay(500);
        console.log(`task #${id} done`);
    }
    
}

(async () => {
    const worker = new Worker();

    await Promise.all([
        worker.runTask(0),
        worker.runTask(1),
        worker.runTask(2),
        worker.runTask(3),
    ]);
})();
```

## What happens

If `Worker.runTask` has the decorator `Synchronized`,it takes 2 seconds to run and logs:
- task #0 started
- task #0 done
- task #1 started
- task #1 done
- task #2 started
- task #2 done
- task #3 started
- task #3 done

if `Synchronized` is omitted from the example code, it takes a half second to run and logs:
- task #0 started
- task #1 started
- task #2 started
- task #3 started
- task #0 done
- task #1 done
- task #2 done
- task #3 done
npm package: @jaenster/weakrefmap
Description: WeakRefMap, a weak map with access to the fields, and keys can be primitives
Author: Jaenster
Latest version: 0.2.2

# WeakMap but completed
Weak references are great, but nearly nothing truly uses it in javascript.

# WeakRefMap.
Why not just use WeakMap? A native WeakMap is write only, you cant do things like `.forEach` or `for (const value of map)`. The only thing it can be used for is seeing if it contains it.

# Example

```typescript
import {WeakRefMap} from "weakrefmap";


class Clients {
    constructor(private readonly server: Server) {
    }

    doSomething() {

    }
}

class Server {
    clients = new WeakRefMap<string, Client>();
}

function test() {
    const server = new Server();
    let alice = new Client(server);
    const bob = new Client(server);
    server.clients.set('alice', alice).add('bob', bob);

    server.clients.forEach(client => client.doSomething());
    
    alice = null;
    // Alice is still floating in memory
    if (server.clients.has('alice')) {
      const lostAlice = server.clients.get('alice')
    }
}

test();
```

If this code was written with a normal `new Map<string, Client>`, everything would float forever in memory and never be cleaned. As both `Client` as `Server` have recursive references to each other. The magic of a weak reference will overcome this issue.

In the past, we would have demanded the user to call some `server.close()` function, but as we (java|type)script developers are lazy and not used with dealing with the garbage collector, we often forget.

With WeakRefMap the following happen
1) End of `test()`, reference all references to the client (`clientA`, `clientB`) get marked as `deletable`. As the variables are the only ones that count. The weak ref map is not counted as a reference
2) All `Client` instances get deleted
3) All server references are gone now, as `test()`'s `server` variable is gone, and so are all `Client` objects are gone
4) All memory usage of `test()` is fully and automatically cleaned up

What happens with a typical Map?
1) End of `test()`, references to the `clientA` and `clientB` are still holden in the `Server` instance.
2) clients instances still exists
3) server reference still exists in clients
4) all memory of test() is still in memory
5) memory leaked
npm package: @jaeseokk/chunk-scheduler
Description: Slice your heavy task in light chunk and run them asynchronously.
Author: Jaeseok Kang
Latest version: 0.0.1

# chunk-scheduler

Slice your heavy task in light chunk and run them asynchronously.

---

## Installation

```sh
yarn add @jaeseokk/chunk-scheduler
```

## Getting started

```ts
import chunkScheduler from '@jaeseokk/chunk-scheduler'

const scheduler = createScheduler()

function* chunkGenerator() {
  let result = 0

  for (let i = 0; i < 10; i++) {
    result += i
    yield
  }

  return result
}

scheduler.runChunks(chunkGenerator())
```

## License

[MIT](./LICENSE.md) as always