open-index/open-npm huggingface dataset:
npm package: @jdfwarrior/defaultmap
Description: A typesafe Map that returns a default value for missing keys
Latest version: 0.1.0

# defaultmap

A typesafe TypeScript `Map` that returns a default value when accessing a key that doesn't exist.

## Install

```bash
bun add defaultmap
# or
npm install defaultmap
```

## Usage

```typescript
import DefaultMap from "defaultmap";

// Static default
const counts = new DefaultMap<string, number>(0);
counts.get("missing"); // 0
counts.get("missing"); // 0 — same value, key is now stored

// Factory default — called once per key, result is stored
const lists = new DefaultMap<string, string[]>(() => []);
lists.get("fruits").push("apple");
lists.get("fruits"); // ["apple"]
lists.get("veggies"); // [] — independent array

// Initial entries
const scores = new DefaultMap<string, number>(0, [
  ["alice", 10],
  ["bob", 20],
]);
scores.get("alice"); // 10
scores.get("charlie"); // 0
```

## API

### `new DefaultMap<K, V>(defaultValue: V | ((key: K) => V), entries?)`

- `defaultValue` — a static value returned for every missing key, **or** a factory function that receives the missing key and returns the default. The factory result is stored, so the factory is called at most once per key.
- `entries` — optional initial `[key, value]` pairs, same as the `Map` constructor.

> **Note:** If you pass an object/array as a static default, all missing keys share the same reference. Use a factory (`() => []`) to get independent instances per key.

### `get(key: K): V`

Returns the value for `key`. If the key is not present, computes and stores the default, then returns it. All other `Map` methods (`set`, `delete`, `has`, `clear`, `forEach`, `keys`, `values`, `entries`) behave exactly as on a standard `Map`.

## License

MIT
npm package: @jdgwf/react-common-components
Description: Common Components I use in React
Author: jdgwf
Latest version: 1.0.0

# react-common-components

> Common Components I use in React

[![NPM](https://img.shields.io/npm/v/react-common-components.svg)](https://www.npmjs.com/package/react-common-components) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-common-components
```

## Usage

```tsx
import React, { Component } from 'react'

import MyComponent from 'react-common-components'
import 'react-common-components/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [jdgwf](https://github.com/jdgwf)
npm package: @jdhillen/eslint-config
Description: ESLint configuration for Vue.js and TypeScript projects
Author: J.D. Hillen
Latest version: 2.0.4

# @jdhillen/eslint-config

ESLint configuration for Vue.js and TypeScript projects with industry-standard rules for clean code.

## Features

- Vue.js 3 support with [eslint-plugin-vue](https://eslint.vuejs.org/)
- TypeScript support with [@typescript-eslint](https://typescript-eslint.io/)
- Import ordering rules with [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
- Best practices for JavaScript and TypeScript
- PascalCase component naming in templates
- Sensible defaults for Vue component structure
- Auto-excludes common directories (node_modules, dist, build) with configurable additional exclusions
- Lints all JavaScript, TypeScript, and Vue files including in the project root

## Installation

```bash
npm install --save-dev @jdhillen/eslint-config
```

With npm v7+ peer dependencies (eslint, typescript) are automatically installed. For yarn or pnpm, or if you want to install specific versions:

```bash
# npm with specific versions
npm install --save-dev @jdhillen/eslint-config eslint@^9 typescript@^5

# yarn
yarn add --dev @jdhillen/eslint-config

# pnpm
pnpm add --save-dev @jdhillen/eslint-config
```

## Usage

### Automatic Setup

After installing, you can use the setup script to automatically configure ESLint in your project:

```bash
npx setup-eslint-config
```

This will:

1. Create an `eslint.config.js` file in your project root
2. Add lint scripts to your package.json

### Manual Configuration

If you prefer to set up manually, create an `eslint.config.js` file in the root of your project:

```js
// eslint.config.js
import createConfig from '@jdhillen/eslint-config';

// Create config with optional additional folder exclusions
// Note: node_modules, dist, and build are already ignored by default
const config = createConfig({
  ignorePaths: [
    // Add additional paths to ignore here, for example:
    '**/coverage/**',
    '**/temp/**',
    '**/logs/**'
  ]
});

export default [
  ...config,
  // You can add your own rules or overrides here
  {
    // Example: Override rules for specific file patterns
    files: ['**/tests/**/*.js'],
    rules: {
      'no-console': 'off'
    }
  }
];
```

For older ESLint versions (< 9.0.0), you'll need to use the legacy version of this package, as ESLint v9+ uses the new flat config system.

### VSCode Integration

For a better development experience, install the [ESLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).

Add the following to your VSCode settings:

```json
{
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
  "eslint.experimental.useFlatConfig": true
}
```

## License

MIT
npm package: @jdhuntington/homebridge-zigbee-nt
Description: ZigBee New Technology Platform plugin for HomeBridge
Author: Pierpaolo Follia
Latest version: 2.6.4

![Logo](zigbee-logo.png)

# homebridge-zigbee-nt

ZigBee Platform plugin for [HomeBridge](https://github.com/homebridge/homebridge)

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
[![madchicken](https://circleci.com/gh/madchicken/homebridge-zigbee-nt.svg?style=svg)](https://app.circleci.com/pipelines/github/madchicken/homebridge-zigbee-nt)

## Description

This Homebridge plugin exposes ZigBee devices connected to TI's [CC253X](http://www.ti.com/wireless-connectivity/simplelink-solutions/zigbee/products.html) wireless SoC to Apple's HomeKit.
It uses [zigbee-herdsman](https://github.com/Koenkk/zigbee-herdsman) and [zigbee-herdsman-converters](https://github.com/Koenkk/zigbee-herdsman-converters) under the hood, so technically all supported devices mapped in zigbee-herdsman-converters should be supported.
To enable a new device you must implement a new HomeKit Device class and regirster it.

This project has been heavily inspired by [homebridge-zigbee](https://github.com/itsmepetrov/homebridge-zigbee) plugin by Anton Petrov.

## Supported devices

[See wiki page](https://github.com/madchicken/homebridge-zigbee-nt/wiki/Supported-devices)

## Build from sources

To build and run the plugin from sources, you need to install [yarn](https://yarnpkg.com) first.

Clone the repo:

    git clone git@github.com:madchicken/homebridge-zigbee-nt.git

Once you get it, run yarn command:

    cd homebridge-zigbee-nt
    yarn && yarn build

You should end up with a new `dist/` folder containing the compiled version of the plugin.

## WEB UI

From version 1.0.8 you can see which device is paired through the [WEB UI exposed on port 9000](http://homebridge.local:9000).
To change the default port, set `httpPort: YOUR_PORT_NUMBER` in the configuration.
To completely disable http UI, set `disableHttpServer: true` in the configuration.

## License

Licensed under [Apache 2.0](LICENSE)

## Contribute

Any PR is welcome to this project, so please, fork and open one if you can!

If otherwise, you simply enjoyed using this plugin, and you want to contribute in some way, you can always donate something!

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/madchicken74)
npm package: @jdiamond/mqtt-bridge
Description: bridge between MQTT brokers
Author: Jason Diamond
Latest version: 1.0.1

# mqtt-bridge

Subscribes to a topic on one broker and republishes its messages to another broker.

```
npm install --global @jdiamond/mqtt-bridge

mqtt-bridge --topic 'foo/bar/#' \
    --from mqtts://source \
    --from-ca path/to/from.crt \
    --from-user alice \
    --from-pass secret \
    --to mqtts://sink \
    --to-ca path/to/to.crt \
    --to-user bob \
    --to-pass secret
```

The required options are `--topic`, `--from`, and `--to`. The rest are optional.

Set `DEBUG=mqtt-bridge` to see debug messages.
npm package: @jdiamond/mqtt-browser
Description: MQTT in TypeScript for browsers
Latest version: 0.1.2

This package contains a browser build of [MQTT.ts](https://github.com/jdiamond/MQTT.ts).

To build:

```
npm install
npm run build
```

Babel is used to create ESM and UMD builds for browsers. Terser is used to minify them.