open-index/open-npm huggingface dataset:
npm package: @giapspzoo/event-emitter
Description: A simple isomorphic, strongly typed event emitter for TypeScript and JavaScript.   It allows you to declare your event map once and get full IntelliSense and type-safety for all listeners and emitted events.
Author: GIAP sp. z o.o.
Latest version: 1.0.0

# @giapspzoo/event-emitter

A simple isomorphic, strongly typed event emitter for TypeScript and JavaScript.  
It allows you to declare your event map once and get full IntelliSense and type-safety for all listeners and emitted events.

## Why?

📦 Zero dependencies

⚡ Lightweight & isomorphic

🛡️ Full TypeScript support with inferred payloads

🔄 Simple API

## Installation

```
npm i @giapspzoo/event-emitter
```

## Basic example

```ts
import EventEmitter from "@giapspzoo/event-emitter";

// Define your event map.
type Events = {
  push: { pushedItem: string }; // event with payload
  clear: void; // event without payload
};

const emitter = new EventEmitter<Events>();

// Add event listeners.
emitter.on("push", ({ pushedItem }) => {
  console.log("Item pushed:", pushedItem);
});

emitter.on("clear", () => {
  console.log("Cleared!");
});

// Emit events according to their declared types.
emitter.emit("push", { pushedItem: "foo" });
emitter.emit("clear");

// Remove a single listener...
const onClear = () => console.log("Cleared!");
emitter.on("clear", onClear);
emitter.off("clear", onClear);

// ...or remove all attached listeners.
emitter.removeAllListeners();
```

## API

### `on(event: string, handler: (payload: P | void) => void) => void`

Registers a new event handler.

### `off(event: string, handler: (payload: P | void) => void) => void`

Removes a previously registered handler.

### `emit(event: string, payload: P | void) => void`

Emits an event.

### `removeAllListeners() => void`

Clears all listeners for all events.

## License

MIT
npm package: @giapspzoo/get-random-id
Description: A utility for generating a random numeric ID.
Author: GIAP sp. z o.o.
Latest version: 1.0.0

# @giapspzoo/get-random-id

A utility for generating a random numeric ID.

## Installation

```
npm i @giapspzoo/get-random-id
```

## Example

```ts
import getRandomId from "@giapspzoo/get-random-id";

getRandomId(); // => 1214851206796
getRandomId(); // => 818477129048
```
npm package: @giapspzoo/gugik-api-client
Description: A set of utility functions for interacting with GUGiK's REST API.
Author: GIAP sp. z o.o.
Latest version: 0.0.1

# @giapspzoo/gugik-api-client

A set of utility functions for interacting with GUGiK's (Head Office of Geodesy and Cartography) REST API.

## API

### `getCityStreets({ simc, options })`

| Parameter      | Type   | Required | Default value | Description             |
| -------------- | ------ | -------- | ------------- | ----------------------- |
| `simc`         | string | Yes      | -             | SIMC identifier of city |
| `options`      | object | No       | `{}`          | Configuration object    |
| `options.srid` | number | No       | -             | CRS of response data    |

### `getMunicipalityCities({ teryt, options })`

| Parameter      | Type   | Required | Default value | Description                      |
| -------------- | ------ | -------- | ------------- | -------------------------------- |
| `teryt`        | string | Yes      | -             | TERYT identifier of municipality |
| `options`      | object | No       | `{}`          | Configuration object             |
| `options.srid` | number | No       | -             | CRS of response data             |

### `getStreetAddresses({ teryt, ulic, options })`

| Parameter      | Type   | Required | Default value | Description                     |
| -------------- | ------ | -------- | ------------- | ------------------------------- |
| `simc`         | string | Yes      | -             | SIMC identifier of municipality |
| `ulic`         | string | No       | -             | ULIC identifier of street       |
| `options`      | object | No       | `{}`          | Configuration object            |
| `options.srid` | number | No       | -             | CRS of response data            |

## Development

### Scripts

#### `build`

Use `npm run build` to prepare a production build of the package.

#### `dev`

Use `npm run dev` to run the functions playground.