open-index/open-npm huggingface dataset:
npm package: @hungvong/kit-demo
Description: Framework-agnostic TypeScript utilities for browser + SSR.
Latest version: 0.1.3

# mudah-kit

Framework-agnostic utilities (pure TypeScript) that work in:

- Browser environment
- SSR environment (e.g. Next.js `getServerSideProps` / `getInitialProps`)

No React import. No Node `http` import. SSR works by **receiving `req`/`res` context from the host app**.

## Install

```bash
pnpm add mudah-kit
```

## API

### `generateMudahClientId(options?)`

- If cookie exists → return existing value
- If not → generate a new UUID
  - Browser → set via `document.cookie`
  - SSR → set via `res.setHeader('Set-Cookie', ...)`
  - If SSR has no `res` → only return value, do not set cookie

```ts
import { generateMudahClientId } from 'mudah-kit';

const id = generateMudahClientId({
  cookieDomain: '.example.com',
  expiryDays: 90,
});
```

### Subpath imports (import theo file / feature)

Bạn có thể import theo feature để tránh “kéo” cả package:

```ts
import { generateMudahClientId } from 'mudah-kit/mudahClientId';
```

Hoặc import đúng file cần dùng:

```ts
import { generateMudahClientId } from 'mudah-kit/mudahClientId/generateMudahClientId';
import { MUDAH_CLIENT_ID_COOKIE } from 'mudah-kit/mudahClientId/constants';
```

## Usage examples

### Browser usage

```ts
import { generateMudahClientId } from 'mudah-kit';

const clientId = generateMudahClientId();
console.log(clientId);
```

### Next.js SSR usage (`getServerSideProps`)

```ts
import type { GetServerSideProps } from 'next';
import { generateMudahClientId } from 'mudah-kit/mudahClientId';

export const getServerSideProps: GetServerSideProps = async (ctx) => {
  const clientId = generateMudahClientId({
    context: {
      req: { headers: { cookie: ctx.req.headers.cookie } },
      res: {
        getHeader: (name) => ctx.res.getHeader(name),
        setHeader: (name, value) => ctx.res.setHeader(name, value),
      },
    },
  });

  return {
    props: { clientId },
  };
};
```

## Build output

This package builds to:

- `dist/index.js` (CommonJS)
- `dist/index.mjs` (ESM)
- `dist/index.d.ts` (Type definitions)

And subpath builds for feature modules, for example:

- `dist/mudahClientId/index.js|.mjs|.d.ts`
- `dist/mudahClientId/generateMudahClientId.js|.mjs|.d.ts`
npm package: @hunlongyu/electron-icon-builder
Description: An icon generator to generate all the icon files needed for electron packaging
Author: Hunlongyu
Latest version: 0.1.5

electron-icon-builder
=================

<p align="center">
	<img src="https://forthebadge.com/images/badges/built-with-love.svg">
<p>
<p align="center">
<img src="https://github.com/aleen42/badges/raw/master/src/visual_studio_code_flat_square.svg?sanitize=true">
<img src="https://github.com/aleen42/badges/raw/master/src/typescript_flat_square.svg?sanitize=true">
</p>
<p align="center">
<img alt="npm" src="https://img.shields.io/npm/dt/@hunlongyu/electron-icon-builder?style=for-the-badge">
<img alt="GitHub" src="https://img.shields.io/github/license/Hunlongyu/eib?style=for-the-badge">
<p>

# Global Usage
```bash
// install
npm i -g @hunlongyu/electron-icon-builder

// usage
eib -i relative/path/file.png -o relative/path/folder
```

# Local Usage
```bash
// install
npm i -D @hunlongyu/electron-icon-builder

// add a srcipt in package.json file
"scripts": {
    "icon": "eib  -i relative/path/file.png -o relative/path/folder"
}

// usage
npm run icon
```

# Flags
```
--input,    -i [String]   [Default: './icon.png'] Path to PNG file, 
--output,   -o [String]   [Default: './build/']   Folder to create files, 
--flatten,  -f [Boolean]  [Default: false]        Flatten output struture
```

# Recommendations
Input file should be 1024px x 1024px or larger. Make sure it is a 1 to 1 aspect ratio on width to height.

# Output structure
```
[output dir]
    -[build]
        -[win]
            -icon.ico
        -[mac]
            - icon.icns
        -[png]
            - 16x16.png
            - 32x32.png
            - 18x18.png
            - 64x64.png
            - 128x128.png
            - 512x512.png
```

When flatten option is enabled

```
[output dir]
    -[build]
        - icon.icns
        - icon.ico
        - 16x16.png
        - 32x32.png
        - 48x48.png
        - 64x64.png
        - 128x128.png
        - 512x512.png
```