open-index/open-npm huggingface dataset:
npm package: @home-ht/home-prettier-config
Description: Home.ht Prettier configuration file
Latest version: 1.0.2

# Installation

- Run `yarn add -D @home-ht/home-prettier-config`
- Create a `.prettierrc.js` file
- Import `@home-ht/home-prettier-config` and export it in `.prettierrc.js`
```
//.prettierrc.js

const configPrettier = require('@home-ht/home-prettier-config');

module.exports = configPrettier;
```
npm package: @home-ht/home-tslint-config
Description: Home.ht TSLint configuration file
Latest version: 1.2.0

# Installation 

- Run `yarn add -D @home-ht/home-tslint-config`
- Create a `tslint.json` file
- Make the `tslint.json` configuration file extend `@home-ht/home-tslint-config` 
```
// tslint.json

{
  "extends": ["@home-ht/home-tslint-config"]
}
```
npm package: @homeappcorporate/design-system
Description: Homeapp design system
Author: Ivan Ignatev
Latest version: 0.2.14

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
npm package: @homeassistant-node/main
Description: An home assistant library for nodeJS
Author: Tim Simon
Latest version: 2.2.3

# Homeassistant-node
A library to create automation for Home Assistant in nodeJS using the WebSocket API.

## How to use
### Initialize the connexion
```typescript
const connection = await configure({
  url: process.env.API_URL,
  access_token: process.env.API_TOKEN,
});
```
Where `API_URL` is `ws://${host:port}/api/websocket` and your `access_token` can be generated from your account.

### Listen for changes on an entity
```typescript
listenForEntity("sun.sun", (entity) => {
    if(entity.new_state.state === 'below_horizon')
        callService('light', 'turn_on', undefined, 'light.living_room')
})
```


### Describe a set of state and give it a callback
```typescript
onEntitiesState([{entity_id: 'binary_sensor.garden_door_contact', state: 'on'}, {entity_id: 'light.living_room_light', state: 'on'}],
    () => callService('light', 'turn_on', undefined, {entity_id: 'light.garden'})
)
```

### Manually subscribe to an event
```typescript
connection.subscribeEvents( (event) => {
  if(event.data.entity_id === "binary_sensor.garden_door_contact" && event.data.new_state === 'on'){
    callService('light', 'turn_on', undefined, {entity_id: 'light.garden'})
  }
})
```

## Thanks
- [Anymaniax's beer temple](https://github.com/anymaniax/beer-temple)
- [Home Assistant official WebSocket library](https://github.com/home-assistant/home-assistant-js-websocket)
npm package: @homeaudio/httplike
Description: library for parsing http-like protocols
Author: Stephen Wan
Latest version: 2.0.0

httplike
========

node.js package for parsing http-like protocols

# IMPORTANT NOTE - TYPESCRIPT FORK

This is a fork of [stephen/httplike](https://github.com/stephen/httplike) that @jabooth undertook for fun in Dec 2016. I moved `httplike` and a handful of other projects to Typescript and placed them under a new namespace at [github/homeaudio](https://github.com/homeaudio/) in an effort to better understand and rapidly improve all these interrelated projects.

For now I'm maintaining my forks at [github/homeaudio](https://github.com/homeaudio/), but I would be delighted if these forks were re-unified with their original projects at some point. Given the extensive nature of the changes made though, I understand that this may be challenging for the original authors.

## Installation
```
npm install @homeaudio/httplike
```

## Usage
```typescript
import { ServerParser } from 'httplike'
const p = new Parser(socket)
p.on('message', (msg) => {
  console.log(msg.method)
  console.log(msg.headers)
  console.log(msg.content)
})
```

## Protocol Assumptions

```httplike``` assumes that the incoming protocol follows HTTP standards on using the Content-Length header to determine how many bytes to wait for in a response body.

## Changelog

##### 2.0.0
- Migration to Typescript
- Adoption of ES2015+ style and features
- New fork maintained at @homeaudio for now
- headers should be set and accessed using `server.headers[KEY] = VALUE` - this is now typesafe, so the `setHeader` method is retired for this cleaner API.
- numerous small API changes - these will be properly documented in a future release
- tests are currently present but broken

##### 1.0.1
- Fixed parsing involving UTF-8 characters (PR #8), and potential stall in pipelined requests (PR #9)

##### 1.0.0
- Removed ```parseHeader``` from public interface on `ClientParser` and `ServerParser`

##### 0.0.9
- Removed dependency on ```lodash```

##### 0.0.7
- Implemented built-in response object modeled after express.js response.
- Added ```trim()``` to method and headers

##### 0.0.5
- Breaking changes to how headers are accessed (```getHeader()``` function instead of ```headers[]```). See tests for example usage.
npm package: @homeaudio/nicercast
Description: Simple Node.js icecast compliant streaming server.
Author: Stephen Wan
Latest version: 1.0.0

# Nicercast

Simple Node.js icecast compliant streaming server.

# IMPORTANT NOTE - TYPESCRIPT FORK

This is a fork of [stephen/nicercast](https://github.com/stephen/nicercast) that @jabooth undertook for fun in Dec 2016. I moved `nicercast` and a handful of other projects to Typescript and placed them under a new namespace at [github/homeaudio](https://github.com/homeaudio/) in an effort to better understand and rapidly improve all these interrelated projects.

For now I'm maintaining my forks at [github/homeaudio](https://github.com/homeaudio/), but I would be delighted if these forks were re-unified with their original projects at some point. Given the extensive nature of the changes made though, I understand that this may be challenging for the original authors.

## Installation

```sh
npm install --save nicercast
```

## Usage

```js
import { Nicercast } from 'nicercast'

// Stream raw audio from stdin
const input = process.stdin
const server = new Nicercast(input, { metadata: 'Process Input' })

server.listen(3000, () => {
  console.log('http://localhost:3000/listen.m3u')
})
```

## API

### `new Nicercast(input[, opts])`

Creates a new Nicercast server that streams the `input` stream of raw audio
data. The optional `opts` parameter can be used to specify initial metadata, by
suppling it under the key `metadata`.

### `Nicercast#setMetadata(metadata)`

Set the current metadata to `metadata`, will be broadcasted to all current
listeners.

### `Nicercast#setInputStream(input)`

Set the current input stream to `input`, will change for all current listeners
as well.

### `Nicercast#listen(port[, hostname][, backlog][, cb])`

Start listening on the specified `port`.

### `Nicercast#close([cb])`

Stop listening.
npm package: @homebaseai/vue2-intercom
Description: An Intercom plugin for Vue.js 2
Author: HomebaseAI
Latest version: 2.0.5

## vue2-intercom

```sh
npm i @homebaseai/vue2-intercom
```

### Usage

```ts
import Vue from 'vue';
import VueIntercom from '@homebaseai/vue2-intercom';

Vue.use(VueIntercom);
```

```ts
new Vue({
  el: '#app',
  data() {
    return {
      userId: 1,
      name: 'John Doe',
      email: 'john@example.com',
    };
  },
  mounted() {
    this.$intercom.boot({
      app_id: import.meta.env.VUE_APP_INTERCOM_TOKEN,
      user_id: this.userId,
      name: this.name,
      email: this.email,
    });
    this.$intercom.show();
  },
});
```
npm package: @homebots/espresso-compiler
Description: Compiler for Espresso language used by Homebots VM
Author: Darlan Alves
Latest version: 1.9.2

# Espresso compiler

Compiler for Espresso language, used by [HomeBots VM](https://github.com/homebots/vm)

## Usage

```
npx @homebots/espresso-compiler <input> <output-format>
```

`<input>`: A script file, or `-` to read from stdin

`<output-format>`: One of the Node.js Buffer string formats (hex, utf8, base64...), or specify `js` to output a valid JS module with an array of bytes with the program

```sh
npx @homebots/espresso-compiler path/to/file.esp hex
cat file.esp | npx @homebots/espresso-compiler - js
```
npm package: @homebots/execution-context
Description: Evaluate an expression with different contexts
Latest version: 1.2.0

# @homebots/execution-context

Used to evaluate Javascript expressions.

## Usage

```typescript
const context = new ExecutionContext();

const object = { a: 40, b: 2 };
const alpha = context.set({ a: 1, b: 2 }).execute('a + b');
const beta = context.execute('a + b', { a: 7, b: 3 });
const charlie = new ExecutionContext(object).execute('this.a + this.b');

expect(alpha).toBe(3);
expect(beta).toBe(10);
expect(charlie).toBe(42);
```

## Why?

Because sometimes we need to execute little bits of Javascript using different values for the same variables, based on the context where that expression is executed.

This is a common scenario in front-end applications where expressions are used in event handlers, like attributes of a template syntax.

For example:

```html
<input type="inputType" /> <button title="this.title" on-click="this.doSomething()">ok</button>
```

## API

### `ExecutionContext`

```typescript
const targetThis = { number: 1 };

// give a value for `this` in `this.xyz`
const context = new ExecutionContext(targetThis);

// set variables
context.set({ variable: 10 });

// execute an expression
context.execute('this.number + variable');
```

### `TreeExecutionContext`

```typescript
const targetThis = { text: 'Hello, ' };
const context = new TreeExecutionContext(targetThis);

// fork the context
const alice = context.fork();
const sandy = context.fork();

// execute expressions
alice.execute('this.text + name', { name: 'Alice' });
sandy.execute('this.text + name', { name: 'Sandy' });
```
npm package: @homebots/parse-html
Description: Strict HTML parser
Author: Darlan Alves
Latest version: 1.2.5

# parse-html

Short and strict HTML parser.

Output format: a tree of objects, starting with a root `Document` node.

`Element` and `Document` nodes can have children, which are any of `Text`, `Comment` or `Element`.

# API

```typescript
import { parse, pack, unpack } from '@homebots/parse-html';
import { serialize, materialize, normalize } from '@homebots/parse-html-runtime';

const document = parse(`
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div>text<br>text</div>
  </body>
</html>`);

console.log(document);

// remove empty text nodes
normalize(document);

// create HTML from document
console.log(serialize(document));

// create DOM elements from document
console.log(materialize(document, (element, node) => {
  // do something with the new element
  // return element or something new
}));

// to generate a minimal version of a node tree
const packed = pack(document);
const unpacked = unpack(packed);
```

# Node types

## Document

```json
{
  "type": "document",
  "docType": "html",
  "children": []
}
```

## Comment

```json
{
  "type": "comment",
  "text": "an html comment"
}
```

## Text

```json
{
  "type": "text",
  "text": "a text\nnode with line breaks"
}
```

## Element

```json
{
  "type": "element",
  "tag": "input",
  "selfClose": true,
  "children": [],
  "attributes": [{ "name": "type", "value": "text" }]
}
```
npm package: @homebots/parse-html-runtime
Description: Runtime extension for @homebots/parse-html
Author: Darlan Alves
Latest version: 1.0.3

# @homebots/parse-html-runtime

Runtime extensions for @homebots/parse-html.

Useful in runtime to work with a parsed tree created from the parser.

## API


**normalize(nodes)**

Remove empty text nodes from parsed tree:

```ts
import { normalize } from 'https://unpkg.com/@homebots/parse-html-runtime@latest/index.js'

const cleanNodes = normalize(nodes);
```

**serialize(nodes)**

Convert a parsed tree back to HTML text

```ts
import { serialize } from 'https://unpkg.com/@homebots/parse-html-runtime@latest/index.js'

const html = normalize(nodes);
```

**materialize(nodes)**

Convert a parsed tree into elements

```ts
import { materialize } from 'https://unpkg.com/@homebots/parse-html-runtime@latest/index.js'

const visitor = (el, node) => {
  // Example: save node structure in the element
  el['@node'] = node
};

const html = materialize(nodes, visitor);
```
npm package: @homebots/typescript-config
Description: Shared Typescript configuration for ESNext libraries
Author: Darlan Alves
Latest version: 1.0.0

# Usage

Basic configuration

```json
{
  "extends": "./node_modules/@homebots/typescript-config/tsconfig.json",
  "compilerOptions": {
    "rootDir": "./src/",
    "outDir": "./dist/"
  },
  "include": ["src/**/*.ts"]
}
```
npm package: @homebound/activesupport
Description: This package provides prototype extensions, similar to the Ruby [ActiveSupport](https://guides.rubyonrails.org/active_support_core_extensions.html) project.
Latest version: 1.22.2

# @homebound/activesupport

This package provides prototype extensions, similar to the Ruby
[ActiveSupport](https://guides.rubyonrails.org/active_support_core_extensions.html) project.

## Installation

```bash
npm install --save @homebound/activesupport
```

```bash
yarn add @homebound/activesupport
```

## Usage

Simply import the package to add the extensions to the prototypes.

```typescript
import "@homebound/activesupport";
```

## Documentation

For now, check out [the source](/src/).