open-index/open-npm huggingface dataset:
npm package: @repeale/eslint-config
Description: @repeale eslint config
Author: Alessio Enrico Repetti
Latest version: 1.6.0

# Eslint Config

![npm](https://img.shields.io/npm/dt/@repeale/eslint-config?style=flat-square)

- [Prettier Config](#eslint-config)
  - [Getting started](#getting-started)
  - [Configs](#configs)
  - [License](#license)

## Getting started

Install the package and related peerDependencies as `devDependencies`:

```sh
npm install --save-dev @repeale/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint prettier typescript
```

or

```sh
yarn add --dev @repeale/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint prettier typescript
```

Extend `@repeale/eslint-config` in your `.eslintrc` file with one of the available configurations:

```json
{
  "extends": "@repeale/eslint-config/react-ts-prettier"
}
```

## Configs

- @repeale/eslint-config/react-ts-prettier
- @repeale/eslint-config/ts-prettier

## License

[MIT License](./LICENSE)
npm package: @repeale/key-value-replacer
Description: Key value replacer
Author: Alessio Enrico Repetti
Latest version: 1.0.1

# key-value-replacer

- This is useful when you have values you have to repeat in an Object and you want to keep a single reference in it

## Getting started

```sh
npm install --save-dev @repeale/key-value-replacer
```

or

```sh
yarn add --dev @repeale/key-value-replacer
```

## Features

- Replaces the key reference with the value
- Familiar template literals variables syntax
- Reference any key with dot notation, like accessing any JS Object prop
- Multiple keys reference replacement in the same string
- Support referencing keys along with text

## Usage

```javascript
import {replacer} from '@repeale/key-value-replacer'

const replaced = replacer({
  me: {
    name: 'John',
    lastName: 'Doe',
  },
  greetings: "Hello i'm ${me.name} ${me.lastName}!",
})
```

## Examples

- i18n:

```javascript
{
  me: {
    name: "John",
    lastName: "Doe"
  },
  greetings: "Hello i'm ${me.name} ${me.lastName}!", // -> "Hello i'm John Doe!"
  ...
}
```

- CSS design tokens and themes:

```javascript
{
  tokens: {
    accent: {
      primary: {
        regular: '#ff6600',
        light: '#ffaa00',
        ...
      },
      ...
    },
    ...
  }
  buttons: {
    primary: {
      background: {
        default: '${tokens.accent.primary.regular}' // -> "#ff6600"
        hover: '${tokens.accent.primary.light}', // -> "#ffaa00"
        ...
      },
      ...
    },
    ...
  },
  menu: {
    link: {
      color: {
        default: '${tokens.accent.primary.regular}' // -> "#ff6600"
        hover: '${tokens.accent.primary.light}', // -> "#ffaa00"
        ...
      },
      ...
    },
    ...
  },
  ...
}
```
npm package: @repeale/prettier-config
Description: @repeale prettier config
Author: Alessio Enrico Repetti
Latest version: 1.0.8

# Prettier Config

![npm](https://img.shields.io/npm/dt/@repeale/prettier-config?style=flat-square)

- [Prettier Config](#prettier-config)
  - [Getting started](#getting-started)
  - [Config](#config)
  - [License](#license)

## Getting started

Install the package and related peerDependencies as `devDependencies`:

```sh
npm install --save-dev @repeale/prettier-config prettier
```

or

```sh
yarn add --dev @repeale/prettier-config prettier
```

Reference `@repeale/prettier-config` in your package.json:

```json
{
  "name": "my-project",
  "version": "1.0.0",
  "prettier": "@repeale/prettier-config"
}
```

or export the config from a `.prettierrc.js` file:

```json
module.exports = {
  ...require('@repeale/prettier-config'),
}
```

this will allow you to easilly overwrite options.

Or, you can use it in other ways as described in the
[official documentation](https://prettier.io/docs/en/configuration.html#sharing-configurations).

## Config

Check the [`.prettierrc.json`](./.prettierrc.json) file if you want to inspect the configuration.

## License

[MIT License](./LICENSE)
npm package: @repeat-dev/api
Description: Package for repeat API integrations.
Author: Adam Janis
Latest version: 0.0.24

# @repeat-dev/api

Package for Repeat API runtime tools.

## Usage

### Inside repeat.dev

```ts
import { RepeatAPI } from "@repeat-dev/api";

// no need to pass the API key
const repeat = new RepeatAPI();

const value = await repeat.kv.get("key");
```

### Outside repeat.dev runtime (Cloudflare Workers, AWS Lambda, etc)

```ts
import { RepeatAPI } from "@repeat-dev/api";

const repeat = new RepeatAPI(apiKey);

const value = await repeat.kv.get("key");
```

## APIs

### KV

### Tasks

### Metrics
npm package: @repeat-z/ol-plot
Description: ```tsx import React, { useEffect, useRef } from 'react'; import Map from 'ol/Map.js'; import OSM from 'ol/source/OSM.js'; import TileLayer from 'ol/layer/Tile.js'; import View from 'ol/View.js'; import 'ol/ol.css'; import * as interaction from 'ol/interac
Latest version: 1.3.0

### Demo

```tsx
import React, { useEffect, useRef } from 'react';
import Map from 'ol/Map.js';
import OSM from 'ol/source/OSM.js';
import TileLayer from 'ol/layer/Tile.js';
import View from 'ol/View.js';
import 'ol/ol.css';
import * as interaction from 'ol/interaction';
import { MOlPlot, PlotType } from '@zhengbiwen/ol-plot';
import '@zhengbiwen/ol-plot/style.css';

export const Demo = () => {
  const plotRef = useRef<MOlPlot>();

  useEffect(() => {
    const map = new Map({
      layers: [
        new TileLayer({
          source: new OSM(),
        }),
      ],
      target: 'map',
      view: new View({
        center: [12929305.990232274, 4845146.768735993],
        zoom: 5,
      }),
      interactions: interaction.defaults({
        doubleClickZoom: false,
        keyboard: false,
      }),
    });

    plotRef.current = new MOlPlot({ map, mode: 'edit' });
    map.addLayer(plotRef.current.getLayer()!);
  }, []);

  const handleDrawStart = (type: PlotType) => {
    plotRef.current?.stopDrawing();
    plotRef.current?.startDrawing(type);
  };

  const handleClear = () => {
    plotRef.current?.clear();
  };

  const handleDelete = () => {
    plotRef.current?.startRemoving();
  };

  const getData = () => {
    console.log(JSON.stringify(plotRef.current?.getData()));
  };

  return (
    <>
      <div style={{ display: 'flex', gap: 10, marginBottom: 10 }}>
        <button onClick={() => handleDrawStart('TEXT')}>文字</button>
        <button onClick={() => handleDrawStart('LINE')}>线</button>
        <button onClick={() => handleDrawStart('CIRCLE')}>圆</button>
        <button onClick={() => handleDrawStart('ELLIPSE')}>椭圆</button>
        <button onClick={() => handleDrawStart('POLYGON')}>多边形</button>
        <button onClick={() => handleDrawStart('ARROW')}>箭头</button>
        <button onClick={() => handleDrawStart('MEASURE_DISTANCE')}>测距离</button>
        <button onClick={() => handleDrawStart('MEASURE_AREA')}>测面积</button>
      </div>
      <div style={{ display: 'flex', gap: 10, marginBottom: 10 }}>
        <button onClick={handleClear}>清空</button>
        <button onClick={handleDelete}>删除</button>
        <button onClick={getData}>获取数据</button>
      </div>
      <div id="map" style={{ width: '100%', height: 500 }}></div>
    </>
  );
};
```
npm package: @repeaterjs/limiters
Description: Basic async iterators functions for limiting concurrency
Latest version: 0.3.3

# @repeaterjs/limiters
Basic async iterators for limiting concurrency, implemented with repeaters.

For more information, visit [repeater.js.org](https://repeater.js.org).

```ts
interface Token {
  readonly id: number;
  readonly limit: number;
  readonly remaining: number;
  release(): void;
}

function semaphore(limit: number): Channel<Token>;

interface ThrottleToken extends Token {
    readonly reset: number;
}

function throttler(wait: number, options?: {
    limit?: number;
    cooldown?: boolean;
}): Channel<ThrottleToken>;
```
npm package: @repeaterjs/pubsub
Description: A generic pubsub class, implemented with repeaters
Latest version: 0.3.4

# @repeater/pubusb
This package is experimental!

A generic pubsub class, implemented with repeaters

For more information, visit [repeater.js.org](https://repeater.js.org).

```ts
interface PubSub<T> {
  publish(topic: string, value: T): Promise<void> | void;
  unpublish(topic: string, reason?: any): Promise<void> | void;
  subscribe(topic: string, buffer?: RepeaterBuffer<T>): AsyncIterableIterator<T>;
  close(reason?: any): Promise<void> | void;
}

class InMemoryPubSub<T> implements PubSub<T> {
  publish(topic: string, value: T): void;
  unpublish(topic: string, reason?: any): void;
  subscribe(topic: string, buffer?: RepeaterBuffer<T>): Repeater<T>;
  close(reason?: any): void;
}
```
npm package: @repeaterjs/timers
Description: Async iterator timer functions
Latest version: 0.3.3

# @repeaterjs/timers
This package is experimental!

Cancelable timers, implemented with repeaters

For more information, visit [repeater.js.org](https://repeater.js.org).

```ts
function delay(wait: number): Repeater<number>;
```

`delay` returns a repeater which yields `Date.now()` `wait` milliseconds after `next` is called. Each call to `next` runs an independent timer. All outstanding timers can be canceled by calling `return`.

```ts
function timeout(wait: number): Repeater<undefined>;
```

`timeout` returns a repeater which rejects with a `TimeoutError` if the repeater does not receive another call to `next` or `return` after the specified `wait`. This behavior is useful when you want to place a fixed upper bound on how long each iteration of an async iterator can take with `Repeater.race`.

```js
import { Repeater } from "@repeaterjs/repeater";
import { timeout } from "@repeaterjs/timers";

const repeater = new Repeater(async (push) => {
  await push(1);
  await push(2);
  await new Promise((resolve) => setTimeout(resolve, 2000));
  await push(3);
});

try {
  (async () => {
    for await (const num of Repeater.race([repeater, timeout(1000)])) {
      console.log(num); // 1, 2
    }
  })();
} catch (err) {
  console.log(err); // TimeoutError: 1000 ms elapsed
}
```

```ts
function interval(wait: number, buffer?: RepeaterBuffer<number>): Repeater<number>;
```

`interval` returns a repeater which resolves with the current timestamp every `wait` milliseconds. The timer does not start until you call `next` on the returned iterator, and can be canceled by calling `return`.
npm package: @repeaterts/eslint-config
Description: Standard Sharable ESLint for RepeaterTS in TS
Author: @repeaterts
Latest version: 1.0.9

<div align="center">

# @repeaterts/eslint-config

**ESLint for RepeaterTS**
[![GitHub](https://img.shields.io/github/license/RepeaterTS/utilities)](https://github.com/RepeaterTS/utilities/blob/master/LICENSE)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/context:javascript)
[![Coverage Status](https://coveralls.io/repos/github/RepeaterTS/utilities/badge.svg?branch=master)](https://coveralls.io/github/RepeaterTS/utilities?branch=master)
[![npm bundle size](https://img.shields.io/bundlephobia/min/@repeaterts/eslint-config?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@repeaterts/eslint-config)
[![npm](https://img.shields.io/npm/v/@repeaterts/eslint-config?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@repeaterts/eslint-config)
[![Depfu](https://badges.depfu.com/badges/2e8e81048dc864df5ec92b047f57ef94/count.svg)](https://depfu.com/github/RepeaterTS/utilities?project_id=21650)

</div>

## Installation

**Peer Dependencies**
```sh
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier eslint prettier typescript
```

**Then me**
```sh
yarn add -D @repeaterts/eslint-config
```

---

## Usage

Add the ESLint config to your `package.json`:

```json
{
	"name": "my-project",
	"eslintConfig": {
		"extends": "@repeaterts"
	}
}
```

Or to `eslintrc.js` / `.eslintrc.json`:

```json
{
	"extends": "@repeaterts"
}
```

Create `tsconfig.eslint.json` next to the eslint config file, for example with content:

```json
{
	"extends": "./tsconfig.json",
	"include": ["src", "test"]
}
```
npm package: @repeaterts/ts-config
Description: Shareable Typescript Configuration for @RepeaterTS
Author: @repeaterts
Latest version: 1.0.10

<div align="center">

# @repeaterts/ts-config

**Typescript Linting for RepeaterTS**
[![GitHub](https://img.shields.io/github/license/RepeaterTS/utilities)](https://github.com/RepeaterTS/utilities/blob/master/LICENSE)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/context:javascript)
[![Coverage Status](https://coveralls.io/repos/github/RepeaterTS/utilities/badge.svg?branch=master)](https://coveralls.io/github/RepeaterTS/utilities?branch=master)
[![npm bundle size](https://img.shields.io/bundlephobia/min/@repeaterts/ts-config?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@repeaterts/ts-config)
[![npm](https://img.shields.io/npm/v/@repeaterts/ts-config?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@repeaterts/ts-config)
[![Depfu](https://badges.depfu.com/badges/2e8e81048dc864df5ec92b047f57ef94/count.svg)](https://depfu.com/github/RepeaterTS/utilities?project_id=21650)

</div>
## Installation

**First install the Peer Dependencies**

```sh
yarn add -D typescript
```

**Then install `@repeaterts/ts-config`**

```sh
yarn add -D @repeaterts/ts-config
```

---

## Usage

You can use `@repeaterts/ts-config`'s
[`tsconfig.json`](/tsconfig.json) by extending it in yours:

```json
{
	"extends": "@repeaterts/ts-config"
}
```

All of its properties are defaulted for bleeding-edge TypeScript options, you may extend this to include your own
configuration options as well.
npm package: @repeaterts/utilities
Description: Common JS Utilities for @RepeaterTS
Author: @repeaterts
Latest version: 1.0.11

<div align="center">

# @repeaterts/utilities

**ESLint for RepeaterTS**
[![GitHub](https://img.shields.io/github/license/RepeaterTS/utilities)](https://github.com/RepeaterTS/utilities/blob/master/LICENSE)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/RepeaterTS/utilities.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RepeaterTS/utilities/context:javascript)
[![Coverage Status](https://coveralls.io/repos/github/RepeaterTS/utilities/badge.svg?branch=master)](https://coveralls.io/github/RepeaterTS/utilities?branch=master)
[![npm bundle size](https://img.shields.io/bundlephobia/min/@repeaterts/utilities?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@repeaterts/utilities)
[![npm](https://img.shields.io/npm/v/@repeaterts/utilities?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@repeaterts/utilities)
[![Depfu](https://badges.depfu.com/badges/2e8e81048dc864df5ec92b047f57ef94/count.svg)](https://depfu.com/github/RepeaterTS/utilities?project_id=21650)

</div>

We often have to use the same code in multiple repositories. We use this package to make it easy to access and distribute this code.

## Features

-   Written in TypeScript
-   Bundled with Rollup so it can be used in NodeJS and browsers
-   Offers CommonJS, ESM and UMD bundles
-   Fully tested

---

## Installation

```sh
yarn add @sapphire/utilities
```