open-index/open-npm huggingface dataset:
npm package: @mrozio/eslint-config
Description: my shareable config for eslint
Author: mrozio13pl
Latest version: 1.0.4

# @mrozio/eslint-config

ESLint config for my projects and stuff.

## Install

```sh
npm i eslint @mrozio/eslint-config --save-dev
```

## Usage

- `.eslintrc.js`

```js
module.exports = {
    extends: '@mrozio/eslint-config'
};
```

##### With Typescript
- make sure you have typescript installed

```sh
npm i typescript --save-dev
```

- `.eslintrc.js`

```js
module.exports = {
    extends: '@mrozio/eslint-config/typescript',
    parserOptions: {
        // @see https://github.com/typescript-eslint/typescript-eslint/issues/890
        project: './tsconfig.json'
    }
};
```

## License

MIT
npm package: @mrozio/exectime
Description: Measure the execution time of a function.
Author: mrozio13pl
Latest version: 1.0.0

# exectime [![npm](https://img.shields.io/npm/v/@mrozio/exectime?color=4CAF50&label=)](https://npm.im/@mrozio/exectime)

> Measures the time it takes to execute a function.

```sh
npm i @mrozio/exectime
```

For both synchronous and asynchronous functions:

```ts
import { execTime } from '@mrozio/exectime';

await execTime(async () => {
    // wait 1 second
    await new Promise(r => setTimeout(r, 1000));
}); // => 1002.227 (ms)
```

Specifically for synchronous functions:

```ts
import { execTimeSync } from '@mrozio/exectime';

execTimeSync(() => {
    // count to 1 billion
    for (let i = 0; i < 1e9;) i++;
}); // => 388.2297 (ms)
```

__Note__: These functions always return the execution time in milliseconds, even if the underlying measurements are in nanoseconds. This is done for consistency across different environments.

In Node.js environments, it uses [process.hrtime](https://nodejs.org/api/process.html#processhrtimebigint) for precise measurements, while in the browser, it utilizes [performance.now](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now). If you want the results to be in nanoseconds, you can simply multiply them by 1 million.

## License

MIT 💖
npm package: @mrozio/i18n
Description: Simple and type-safe i18n for React
Author: mrozio13pl
Latest version: 0.1.1

# @mrozio/i18n [![npm](https://img.shields.io/npm/v/@mrozio/i18n?color=%23FF6F61&label)](https://npm.im/@mrozio/i18n) [![bundle](https://img.shields.io/bundlephobia/minzip/@mrozio/i18n?color=%23FF6F61&label)](https://bundlephobia.com/result?p=@mrozio/i18n)

> Simple and type-safe i18n for React

🌍 Internalization for React, made simple.

## Usage

Define translations:

```tsx
import { createI18n } from '@mrozio/i18n';

const { useTranslate } = createI18n({
    en: {
        section: {
            title: 'Hello World'
        }
    },
    de: { /* ... */ }
});
```

Use them inside your component:

```tsx
function Component() {
    const t = useTranslate();

    return <h1>{t('section.title')}</h1>; 
}
```

## Documentation

https://mrozio13pl.github.io/i18n
npm package: @mrozio/wcwidth
Description: Port of C's wcwidth.
Author: mrozio13pl
Latest version: 1.0.0

# wcwidth [![npm](https://img.shields.io/npm/v/@mrozio/wcwidth?color=4CAF50&label=)](https://npm.im/@mrozio/wcwidth)

Dead simple, tiny (`~2.3 kB`) port of [wcwidth](https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c) implemented in C by Markus Kuhn.

```bash
npm i @mrozio/wcwidth
```

```ts
import { wcwidth, wcswidth } from '@mrozio/wcwidth';

'嘿'.length; // <= 1
wcwidth('嘿'.charCodeAt()); // <= 2

'我讨厌 JavaScript'.length; // <= 14
wcswidth('我讨厌 JavaScript'); // <= 17
```

## License

MIT 💖