open-index/open-npm huggingface dataset:
npm package: @jurijtokarski/cache
Description: In-memory cache class
Author: J.T.
Latest version: 0.7.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# In-memory cache class

## Install

`npm i @jurijtokarski/cache` or `yarn add @jurijtokarski/cache`.

## Example

```javascript
const cache = new Cache();

cache.get("example"); // => { value: null, status: 0 }

cache.set("example", [1, 2, 3], getMinutesInMS(10));

cache.get("example"); // => { value: [1, 2, 3], status: 2 }

// after 10 minutes

cache.get("example"); // => { value: [1, 2, 3], status: 1 }
```

## Statuses

- `0` means value was not set yet
- `1` means value was set, but was expired
- `2` means freash value

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/cache/index.d.ts) for package.
npm package: @jurijtokarski/calc
Description: Math and arrays calculation helpers
Author: J.T.
Latest version: 0.7.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Math and arrays calculation helpers

## Install

`npm i @jurijtokarski/calc` or `yarn add @jurijtokarski/calc`.

## `round`

```javascript
round(2.98, 0); // => 3
round(4005, 4); // => 4005.0000
```

## `sum`

```javascript
sum([1, 2, 3, 4]); // => 10
sum([6, 12, 4]); // => 22
```

## `average`

```javascript
average([1, 2, 3, 4]); // => 2.5
average([6, 12, 4]); // => 7.33
```

## `group`

```javascript
group([1, 2, 3, 4], 2); // => [[1, 2], [3, 4]]
average([6, 12, 4], 2); // => [[6, 12], [4]]
```

## `max` & `min`

```javascript
min([1, 2, 3, 4]); // => 1
max(6, 12, 4); // => 12
```

## `unique`

```javascript
unique([0, 0, 1, 2, 2, 3, 4]); // => [0, 1, 2, 3, 4]
```

## `ofLength`

```javascript
ofLength(3); // => [undefined, undefined, undefined] 
```

## `frames`

```javascript
frames(0, 100, 10); // => [[0, 10], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]
frames(0, 70, 8); // => [[0, 8], [8, 16], [16, 24], [24, 32], [32, 40], [40, 48], [48, 56], [56, 64]],
frames(0, 70, 8, true); // => [[0, 8], [8, 16], [16, 24], [24, 32], [32, 40], [40, 48], [48, 56], [56, 64], [64, 70]],
```

## `randomInArray`

```javascript
randomInArray([1, 2, 3, 4, 5]); // => 3
randomInArray([1, 2, 3, 4, 5]); // => 1
randomInArray([1, 2, 3, 4, 5]); // => 5
randomInArray([1, 2, 3, 4, 5]); // => 3
randomInArray([1, 2, 3, 4, 5]); // => 5
```

## `randomInRange`

```javascript
randomInRange(0, 1); // => 0
randomInRange(0, 1); // => 1
randomInRange(0, 1, 2); // => 0.87
randomInRange(0, 1, 2); // => 0.02
randomInRange(4, 10); // => 9
randomInRange(4, 10); // => 4
randomInRange(4, 10, 3); // => 7.689
randomInRange(4, 10, 3); // => 9.448
```

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/calc/index.d.ts) for the package.
npm package: @jurijtokarski/firepush
Description: Firebase Cloud Messaging web-push helper
Author: J.T.
Latest version: 0.7.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Firebase Cloud Messaging web-push helper

## Install

`npm i @jurijtokarski/firepush` or `yarn add @jurijtokarski/firepush`.

## Example

```
import { FirePush } from "@jurijtokarski/firepush";

const isLocalhost = Boolean(
  window.location.hostname === 'localhost' ||
  window.location.hostname === '[::1]' ||
  window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
);

if (isLocalhost) {
  return;
}

if (!window.firebase?.messaging || !window.firebase.messaging.isSupported()) {
  return;
}

const KEY = "--your-vapid-key--";

new FirePush(window.firebase.messaging(), KEY)
  .initialize()
  .setCallback((payload: any) => {
    const notification = new Notification(payload.notification.title, {
      body: payload.notification.body
    });

    notification.addEventListener("click", function () {
      window.open("/");
      notification.close();
    });
  });
```

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/firepush/index.d.ts) for the package.
npm package: @jurijtokarski/format
Description: Formatting helpers
Author: J.T.
Latest version: 0.7.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Formatting helpers

## Install

`npm i @jurijtokarski/format` or `yarn add @jurijtokarski/format`.

## `formatPrice`

```javascript
formatPrice(100.0981923876, "PLN"); // 100,10 zł (third param set based on browser locale)
formatPrice(100.0981923876, "USD"); // 100,10 USD (third param set based on browser locale)
formatPrice(100.0981923876, "USD", "en"); // $100.10
formatPrice(100.0981923876, "PLN", "uk"); // 100,10 PLN
formatPrice(100.0981923876, "PLN", "en"); // PLN 100.10
```

## `formatPrice`

```javascript
capitalize("hello"); // Hello
capitalize("hELLO"); // Hello
capitalize("hEllO"); // Hello
capitalize("HELLO"); // Hello
```

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/format/index.d.ts) for the package.
npm package: @jurijtokarski/hash
Description: Hash and ID generator helpers
Author: J.T.
Latest version: 0.7.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Hash and ID generator helpers

## Install

`npm i @jurijtokarski/hash` or `yarn add @jurijtokarski/hash`.

## `getSHA1Hash`

```javascript
getSHA1Hash("dummy string"); // => 2883565e30019b2ece774e02e6e2da38ffefdda5
```

## `getMD5Hash`

```javascript
getMD5Hash("dummy string"); // => ec7dd4aab5611a76a24985bf59976763
```

## `getUniqueReadableCode`

```javascript
getUniqueReadableCode(); // => MYERECNNUYMMY
```

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/hash/index.d.ts) for the package.
npm package: @jurijtokarski/times
Description: Simple time converting to miliseconds
Author: J.T.
Latest version: 0.7.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Simple time converting to miliseconds

## Install

`npm i @jurijtokarski/times` or `yarn add @jurijtokarski/times`.

## `getSecondsInMS`

```javascript
getSecondsInMS(10); // => 10000
```

## `getMinutesInMS`

```javascript
getMinutesInMS(10); // => 600000
```

## `getHoursInMS`

```javascript
getHoursInMS(10); // => 36000000
```

## `getDaysInMS`

```javascript
getDaysInMS(10); // => 864000000
```

## `getWeeksInMS`

```javascript
getWeeksInMS(10); // => 6048000000
```

## Definitions

Feel free to check TypeScript's [definitions](https://github.com/jurijtokarski/stuff/blob/master/packages/times/index.d.ts) for the package.
npm package: @jurislm/judicial-mcp
Description: MCP server for accessing Taiwan Judicial Yuan open data and judgments.
Author: Terry Chen
Latest version: 1.3.0

# @jurislm/judicial-mcp

MCP (Model Context Protocol) server for [Taiwan Judicial Yuan](https://www.judicial.gov.tw) — provides 7 tools for accessing open data and judgments via natural language.

## Tools

### Authentication (2 tools)
- `auth_token` — Get authorization token for judgment API (uses `JUDICIAL_USER` / `JUDICIAL_PASSWORD` env vars by default)
- `member_token` — Get member token for open data API (uses `JUDICIAL_USER` / `JUDICIAL_PASSWORD` env vars by default)

### Judgments (2 tools)
- `list_judgments` — Get judgment change list (requires `auth_token`)
- `get_judgment` — Get judgment content by JID (requires `auth_token`)

### Open Data (3 tools)
- `list_categories` — List topic categories (requires `member_token`)
- `list_resources` — List data sources for a category (requires `member_token` + `categoryNo`)
- `download_file` — Download a data file with pagination support (requires `member_token` + `fileSetId`)

## Setup

### Environment Variables

```bash
JUDICIAL_USER=your_username
JUDICIAL_PASSWORD=your_password
```

### Usage with Claude Code (via bunx)

Add to your MCP configuration (`.mcp.json` or `~/.claude/settings.json`):

```json
{
  "mcpServers": {
    "judicial": {
      "command": "bunx",
      "args": ["@jurislm/judicial-mcp@latest"],
      "env": {
        "JUDICIAL_USER": "your_username",
        "JUDICIAL_PASSWORD": "your_password"
      }
    }
  }
}
```

### Usage with Claude Code Plugin (jurislm-tools)

If you use the [jurislm-tools](https://github.com/jurislm/jurislm-tools) Claude Code plugin, `jt:judicial` is included:

```
/plugin marketplace update jurislm-tools
```

Then set environment variables in `~/.zshenv`:

```bash
export JUDICIAL_USER=your_username
export JUDICIAL_PASSWORD=your_password
```

## Development

```bash
npm install
npm test           # Run tests
npm run lint       # oxlint
```

## License

MIT