open-index/open-npm huggingface dataset:
npm package: @hackbg/runspec
Description: Test runner.
Latest version: 2.3.1

# `@hackbg/runspec` [![NPM version](https://img.shields.io/npm/v/@hackbg/runspec?color=9013fe&label=)](https://www.npmjs.com/package/@hackbg/runspec)

**Minimal test runner and reporter.**

Its gimmick is that there are no gimmicks.
No `describe`, no `expect`, no `beforeEach`/`afterAll`, etc.
Who told you you needed those, anyway?

## How to use

1. Define your **test cases** as plain old **functions** -
  synchronous or asynchronous, it's smart enough to handle
  both correctly, and you're smart enough to use JavaScript's
  standard control flow vocabulary.

2. Group test cases into **specifications** via regular ES modules
  (i.e. collect them all in an object and `export default` it.)

```typescript
// spec1.spec.js
export default {
  'synchronous test' (assert) {
    assert(true)
  },
  async 'asynchronous test' (assert) {
    await someAsyncFunction()
    assert(true)
  }
}
```

3. Group specifications into a **test suite** in a single executable script
   which calls `runSpec` on the test suite to execute the specifications.
   By default, it looks at `process.argv.slice(2)` - if it's empty, it runs
   all specs. If it contains names of test suites, it runs only those.

```typescript
// index.spec.js
import runSpec from '@hackbg/runspec'
import Spec1   from './spec1.spec'
import Spec2   from './spec2.spec'
import Spec3   from './spec3.spec'
runSpec({ Spec1, Spec2, Spec3 })
```

```sh
node index.spec.js
node index.spec.js Spec1
node index.spec.js Spec2 Spec3
```

4. Add the script to your project's `package.json` and run with `npm test`.

```json
{
  "scripts": {
    "test": "node index.spec.js"
  }
}
```

```sh
npm test
npm test Spec1
npm test Spec2 Spec3
```

* Goes well with [Ganesha](https://github.com/hackbg/ganesha) ;-)
npm package: @hackbg/spec
Description: Tiny no-gimmicks test runner and reporter. Paired with @hackbg/ganesha, makes @hackbg/ensuite.
Latest version: 1.0.0

# `@hackbg/spec` [![NPM version](https://img.shields.io/npm/v/@hackbg/spec?color=9013fe&label=)](https://www.npmjs.com/package/@hackbg/spec)

**Minimal test runner and reporter.**

Its gimmick is that there are no gimmicks.
No `describe`, no `expect`, no `beforeEach`/`afterAll`, etc.
Who told you you needed those, anyway?

## How to use

1. Define your **test cases** as plain old **functions** -
  synchronous or asynchronous, it's smart enough to handle
  both correctly, and you're smart enough to use JavaScript's
  standard control flow vocabulary.

2. Group test cases into **specifications** via regular ES modules
  (i.e. collect them all in an object and `export default` it.)

```typescript
// spec1.spec.js
export default {
  'synchronous test' (assert) {
    assert(true)
  },
  async 'asynchronous test' (assert) {
    await someAsyncFunction()
    assert(true)
  }
}
```

3. Group specifications into a **test suite** in a single executable script
   which calls `runSpec` on the test suite to execute the specifications.
   By default, it looks at `process.argv.slice(2)` - if it's empty, it runs
   all specs. If it contains names of test suites, it runs only those.

```typescript
// index.spec.js
import runSpec from '@hackbg/spec'
import Spec1   from './spec1.spec'
import Spec2   from './spec2.spec'
import Spec3   from './spec3.spec'
runSpec({ Spec1, Spec2, Spec3 })
```

```sh
node index.spec.js
node index.spec.js Spec1
node index.spec.js Spec2 Spec3
```

4. Add the script to your project's `package.json` and run with `npm test`.

```json
{
  "scripts": {
    "test": "node index.spec.js"
  }
}
```

```sh
npm test
npm test Spec1
npm test Spec2 Spec3
```

* Goes well with [Ganesha](https://github.com/hackbg/ganesha) ;-)
npm package: @hackbg/toolbox
Description: Baseline utilities.
Latest version: 4.2.1

<div align="center">

# Hack.bg Toolbox

[![NPM version](https://img.shields.io/npm/v/@hackbg/toolbox?color=9013fe&label=@hackbg/toolbox&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/toolbox)

General utilities for Node.js.

|Package|Status|Description|
|---|---|---|
|[**`@hackbg/dokeres`**](./dokeres/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/dokeres?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/dokeres)|**Dockerize commands.**        |
|[**`@hackbg/forkers`**](./forkers/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/forkers?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/forkers)|**Web worker wrapper.**        |
|[**`@hackbg/formati`**](./formati/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/formati?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/formati)|**Data encodings and formats.**|
|[**`@hackbg/izomorf`**](./izomorf/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/izomorf?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/izomorf)|**Helper for publishing isomorphic TS modules.**|
|[**`@hackbg/kabinet`**](./kabinet/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/kabinet?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/kabinet)|**Filesystem model.**          |
|[**`@hackbg/komandi`**](./komandi/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/komandi?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/komandi)|**Command runner.**            |
|[**`@hackbg/konzola`**](./konzola/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/konzola?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/konzola)|**Console output.**            |
|[**`@hackbg/portali`**](./portali/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/portali?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/portali)|**Network port utilities.**    |
|[**`@hackbg/runspec`**](./runspec/README.md)|[![NPM version](https://img.shields.io/npm/v/@hackbg/runspec?color=9013fe&label=&style=for-the-badge)](https://www.npmjs.com/package/@hackbg/runspec)|**Test runner and reporter.**  |

Used by [**Fadroma**](https://github.com/hackbg/fadroma), the distributed application framework by [**Hack.bg**](https://hack.bg),<br>
and [**Ensuite**](https://github.com/hackbg/ensuite), the associated testing and validation framework.

</div>
npm package: @hackclub/design-system
Description: Hack Club Design System
Author: Lachlan Campbell
Latest version: 0.0.1-18

# Hack Club Design System

https://design.hackclub.com/

```sh
yarn add @hackclub/design-system
```

This project is heavily inspired by [Priceline.com’s design system][pcln].

## Contributing

Please be sure to read the [Contributing](docs/Contributing.md) doc :)

## [Documentation](docs)

- [Getting Started](docs/GettingStarted.md)
- [Contributing](docs/Contributing.md)
- [Theme](docs/Theme.md)
- [ThemeProvider](docs/ThemeProvider.md)

## Goals

The core goals of this project are to:

- Speed up design and development velocity
- Help create consistent, beautiful, and usable UI in our various websites
- Promote best practices for accessibility and responsive web design

We hope to accomplish these goals by:

- Reducing the number of decisions needed when iterating on UI
- Reducing the amount of code duplication in our apps
- Serving as the standard for hackclub.com’s visual language
- Providing easy-to-use and extensible components for anyone to consume

[pcln]: https://github.com/pricelinelabs/design-system
[site]: https://design.hackclub.com/

[MIT License](LICENSE.md)
npm package: @hackclub/markdown
Description: Render Markdown to HTML, Hack Club-style
Author: Lachlan Campbell
Latest version: 0.1.3

# `@hackclub/markdown`

Render Markdown to HTML, Hack Club-style. Used primarily on the [Hack Club Workshops](https://hackclub.com/workshops/) site.

```sh
yarn add @hackclub/markdown
# npm i @hackclub/markdown
```

[**Try the demo**](https://markdown.hackclub.com)

## Usage

This package does not include any frontend code, such as React or CSS.

This package is designed for rendering at build or otherwise on a server, not client-side—
the bundle size is significant & it’s not been optimized for performance.

Always use with `await`.

```js
import fs from 'fs'
import md from '@hackclub/markdown'

const getReadme = async () => (
  const text = fs.readFileSync('./README.md', 'utf8')
  return await md(text, '/README.md', '/static')
)
```

| Param       | Default        | Description                                                     |
| ----------- | -------------- | --------------------------------------------------------------- |
| input       | Req’d!         | String. The Markdown text to transform.                         |
| filePath    | `'/README.md'` | String. The Markdown’s path (for fixing relative image links).  |
| imagePrefix | `'/'`          | String. A prefix for the path to relative images.               |
| removeTitle | `false`        | Bool. Remove starting `h1` (if titles are rendered separately). |

If you need to parse frontmatter, we recommend using [gray-matter](https://npm.im/gray-matter)
alongside `@hackclub/markdown`, but it’s not included in this package.

***

Partially based on the [Next.js documentation site](https://github.com/zeit/next-site/pull/473/files#diff-879732a0915babd1688248ad1144c2d4).

MIT License
npm package: @hackclub/meta
Description: Generate meta tags for Hack Club pages
Latest version: 1.2.1

# @hackclub/meta

React component for generating Open Graph/etc meta tags for Hack Club pages.
Designed for Next.js but framework-agnostic.

Not recommended for non-Hack Club sites—you’ll get Hack Club favicons :)

## Usage

```bash
yarn add @hackclub/meta
# npm i @hackclub/meta
```

Example for [hackathons.hackclub.com](https://hackathons.hackclub.com):

```js
// import Head from 'next/head'

<Meta
  as={Head} // component to wrap tags in, defaults to React.Fragment
  name="Hack Club" // site name
  title="Hackathons" // page title
  description="List of upcoming high school hackathons" // page description
  image="https://hackathons.hackclub.com/card.png" // large summary image URL
  color="#ec3750" // theme color
  manifest="/site.webmanifest" // link to site manifest
/>
```

All props are optional. If you include multiple times, the tags from the last
instance will be used.

MIT License
npm package: @hackclub/scrapbook-grid
Description: 📸 Embed your Scrapbook in your React site
Author: @sampoder
Latest version: 1.0.1

# scrapbook-grid

> 📸 Embed your Scrapbook in your React site

[![NPM](https://img.shields.io/npm/v/@hackclub/scrapbook-grid.svg)](https://www.npmjs.com/package/@hackclub/scrapbook-grid)

## Install

```bash
npm install --save @hackclub/scrapbook-grid
```

```bash
yarn add @hackclub/scrapbook-grid
```

## Usage

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

import ScrapbookGrid from '@hackclub/scrapbook-grid'

function App() {
  return (
    <ScrapbookGrid
      posts={postsData} // You can get this data from the Scrapbook api
      hideReactions={true}
      profile // If you are attempting to simulate a profile page
      fonts={{ body: '"Baloo 2"' }} // Should be a string that you would have with css after `font-family:`
      colors={{ red: '#ec3750'}} // View colors at: https://github.com/hackclub/summer-scrapbook#colors--fonts
    />
  )
}
```

Made by [@sampoder](https://github.com/@sampoder)
npm package: @hackclub/theme
Description: Hack Club’s theme for Theme UI websites
Author: Lachlan Campbell
Latest version: 1.1.0

# @hackclub/theme

[Theme UI](https://theme-ui.com) theme for [Hack Club](https://hackclub.com)

```bash
yarn add @hackclub/theme
# npm i @hackclub/theme
```

Check out theme: [**theme.hackclub.com**](https://theme.hackclub.com)

## Usage

```js
import { ThemeProvider } from 'theme-ui'
import theme from '@hackclub/theme'

export default ({ children }) => (
  <ThemeProvider theme={theme}>{children}</ThemeProvider>
)
```

### Fonts

This package also bundles 3 CSS files that include Hack Club’s webfonts:
`reg.css`, `reg-bold.css`, & `reg-ital-bold.css`.
To use, just import straight from the package:

```js
import '@hackclub/theme/fonts/reg-bold.css'
```

(In a Next.js project, [place](https://nextjs.org/docs/basic-features/built-in-css-support) in the `pages/_app.js` file.)

MIT License
npm package: @hackcode/env-example-generator
Description: simple cli script to extract all environment variables being used in code
Author: YashKumarVerma
Latest version: 1.0.1

# env example generator

<p align="center">
<img src="https://user-images.githubusercontent.com/14032427/94772802-0e242080-03d8-11eb-9e7e-f982372886bc.png" width="400">
</p>

---

Ever wanted to try out someone's project and kept figuring out all the environment variables that were needed ? Or you are just too lazy to document the same in your own project ? Worry not !

This is a simple npm package that will read through the entire codebase (don't worry, only javascript and typescript files) of your project, and create a `.env.example` file with all the environment configurations that are used in the code.

---

## Usage

```bash
# install the package using
sudo npm i -g @hackcode/env-example-generator

# run the cli from the project root
generate-env

# An .env.example file would be created
```
npm package: @hackcode/file-preview-page
Description: a simple command line utility to generate index pages in any directory
Author: YashKumarVerma
Latest version: 0.0.1

# file-preview-page

[![GitHub issues](https://img.shields.io/github/issues/hackcode-packages/file-preview-page?style=flat-square)](https://github.com/hackcode-packages/file-preview-page/issues)
[![GitHub license](https://img.shields.io/github/license/hackcode-packages/file-preview-page?style=flat-square)](https://github.com/hackcode-packages/file-preview-page/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/hackcode-packages/file-preview-page?style=flat-square)](https://github.com/hackcode-packages/file-preview-page/stargazers)

Ever wanted to quickly share files with someone, but the server did not support directory listings ? Worry Not.

This little package can quickly generate a directory listing which can be then deployed alongwith the files to make it easy to share files over free public hosting spaces like surge.sh, vercel, netlify, firebase or even your own server.

## Usage

```bash
# Install
sudo npm i -g @hackcode/file-preview-page

# Run from directory where you want to generate index file
cd my-project
file-preview-page

# Checkout the index.html file created
google-chrome index.html
```

#### Logs

![https://i.imgur.com/U5WlzgG.png](https://i.imgur.com/U5WlzgG.png)

#### Generated File

Note that all the file-names are clickable, to facilitate quick navigation / download.

![https://i.imgur.com/Jc7zInK.png](https://i.imgur.com/Jc7zInK.png)
npm package: @hackdonalds/emitter-socket
Description: ## Table of Contents
Latest version: 2.0.0

# HackDonalds' Emitter Socket

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Examples](#examples)
- [API](#api)
- [License](#license)

Emitter socket is used to emit events in a socket client swarm. 

*Client:* A WebSocket client on browser 

*Server:* Websocket server

*Room:* A namespace _Client_ connects to 

Socket messages between _Client_ and _Server_ are always `typeof RemoteTrigger`

## Install

Install with `npm install @hackdonalds/emitter-socket`

Import in your project:
```javascript
// ES6 Style
import EmitterClient from "@hackdonalds/emitter-socket"
// CommonJS
const EmitterClient = require("@hackdonalds/emitter-socket")

const peer = new EmitterClient({
    host: 'localhost',
    port: 8080,
    room: 'room_name_to_connect_to'
})
```

*To run emitter server*

```javascript
import {server} from "@hackdonalds/emitter/socket/dist/server"
const PORT = process.env.PORT || 8080
server.listen(PORT)
```

## Examples

Trigger the event on every peer connected to the room:

```javascript
peer.triggerOnRoom('event_type',{
    ...yourData
})
```

Or trigger event on another peer

```javascript
peer.triggerOnClient(clientID, 'event_name', {
    ...yourData
})
```

## API

...

## License

[MIT License](https://opensource.org/licenses/MIT) © [Hilmi Tolga SAHIN](https://kucukkanat.com/)
npm package: @hacken/abi-decode-cli
Description: A command-line interface tool that decodes typed ABI data.
Latest version: 1.0.1

# abi-decode-cli

A command-line interface tool that decodes typed ABI data.

## Installation

```sh
$ npm install -g @hacken/abi-decode-cli
```

## Usage

```sh
npx abi-decode -d <hex-data> -t <types>
```

## Examples

### Decoding function call

```
npx abi-decode -d 0x561b24630000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000000000000000000000000 -t function:uint256,uint256,bool

> Call: 0x561b2463
> 0: 6 (uint256)
> 1: 1000000000000 (uint256)
> 2: false (bool)
```

### Decoding Transfer event data

```
npx abi-decode -d 0x000000000000000000000000000000000000000000000000000000e8d4a51000 -t uint256

> 0: 1000000000000 (uint256)
```