open-index/open-npm huggingface dataset:
npm package: @heviir/http-errors
Description: http errors
Author: h.viirmae@gmail.com
Latest version: 1.0.3

# http-errors

```ts
import httpErrors from 'http-errors';
```

```ts
const data = {}; // optional
const err = new httpErrors.Unauthorized(data);

err.code; // 401
err.message; // "Unauthorized"
err.type; // "Unauthorized"
err.data; // data
```

```ts
new httpErrors.GatewayTimeout().message; // "Gateway Timeout"
```
npm package: @hew-bot/hubot
Description: A simple helpful robot for your Company
Author: hubot
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/hubotio/hubot.svg?branch=master)](https://travis-ci.org/hubotio/hubot) [![Coverage Status](https://coveralls.io/repos/github/hubotio/hubot/badge.svg?branch=master)](https://coveralls.io/github/hubotio/hubot?branch=master)

# Hubot

Hubot is a framework to build chat bots, modeled after GitHub's Campfire bot of the same name, hubot.
He's pretty cool. He's [extendable with scripts](http://hubot.github.com/docs/#scripts) and can work
on [many different chat services](https://hubot.github.com/docs/adapters/).

This repository provides a library that's distributed by `npm` that you
use for building your own bots.  See the [documentation](http://hubot.github.com/docs)
for details on getting up and running with your very own robot friend.

In most cases, you'll probably never have to hack on this repo directly if you
are building your own bot. But if you do, check out [CONTRIBUTING.md](CONTRIBUTING.md)

If you'd like to chat with Hubot users and developers, [join us on Slack](https://hubot-slackin.herokuapp.com/).

## License

See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
npm package: @hew-bot/hubot-calculator
Description: Hubot script for basic calculator functionality
Author: mrinjamul
Latest version: 1.0.0

hubot-calculator
================

Replacement for hubot's math.coffee script that uses http://mathjs.org/ instead of decommissioned Google calculator

## Installation

### Update the files to include the hubot-calculator module:

#### package.json
    ...
    "dependencies": {
      ...
      "hubot-calculator": ">= 0.4.0"
      ...
    },
    ...

#### external-scripts.json
    [...,"hubot-calculator"]

Run `npm install` to install hubot-calculator and dependencies.

Commands
-----
```
hubot calculate <expression> - Calculate the given math expression.
hubot convert <expression> in <units> - Convert expression to given units.
```

Examples
-----
```
hubot calculate sin(45 deg) ^ 2
@hubot: 0.5
hubot convert 34 L in gal
@hubot: 8.9818492676623 gal
```
# hubot-calculator
npm package: @hew-lang/playground-client
Description: TypeScript client for the Hew Playground API.
Author: Stephen Olesen
Latest version: 0.2.0

# @hew-lang/playground-client

Lightweight TypeScript client for the Hew Playground API.

## Install

```bash
npm install @hew-lang/playground-client
```

## Simplest usage

```ts
import { HewPlaygroundClient } from '@hew-lang/playground-client';

const client = new HewPlaygroundClient('https://livecode-v1.hew.sh');

const result = await client.run('fn main() { println("hello"); }');
console.log(result.stdout);
```

## Runtime requirements

- Works in modern browsers.
- Works in Node.js when `fetch` is available globally.
- For older runtimes or custom transport, pass your own `fetch` implementation in the client options.

## Client construction

```ts
import { HewPlaygroundClient } from '@hew-lang/playground-client';

const client = new HewPlaygroundClient({
  baseUrl: 'https://livecode-v1.hew.sh',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
```

### Constructor options

| Option | Type | Description |
| --- | --- | --- |
| `baseUrl` | `string` | Base URL of the playground server. |
| `fetch` | `PlaygroundFetch` | Optional custom fetch implementation. |
| `headers` | `PlaygroundHeadersInit` | Optional default headers added to every request. |

## API overview

The client mirrors the HTTP API with typed methods:

| Method | Description |
| --- | --- |
| `health()` | Returns the plain-text health response. |
| `run(sourceOrRequest)` | Compiles and runs Hew source code. |
| `listExamples()` | Lists built-in example programs. |
| `createShare(sourceOrRequest)` | Stores source code and returns a share ID. |
| `getShare(id)` | Fetches a previously shared snippet. |

The package exports these request/response types:

- `RunRequest`, `RunResponse`
- `Example`
- `ShareRequest`, `ShareResponse`, `ShareGetResponse`
- `ErrorResponse`
- `PlaygroundClientOptions`
- `PlaygroundApiError`

## Error handling

Non-2xx HTTP responses throw `PlaygroundApiError`.

```ts
import { HewPlaygroundClient, PlaygroundApiError } from '@hew-lang/playground-client';

const client = new HewPlaygroundClient('https://livecode-v1.hew.sh');

try {
  const share = await client.createShare('fn main() { println(1); }');
  console.log(share.id);
} catch (error) {
  if (error instanceof PlaygroundApiError) {
    console.error(error.status, error.body);
  }
}
```

`run()` has one important API-level nuance: compile failures still come back as a normal JSON `RunResponse`, so check `success`, `compile_error`, and `exit_code` rather than assuming every unsuccessful program run throws.

## Related artifacts

- `openapi.json` — machine-readable HTTP API specification.
- `hew-playground-client.ts` — canonical single-file SDK source if you want to vendor the client directly.

For a local checkout of this repository, you can swap the import path to `./hew-playground-client`.

## License

MIT License. Copyright (c) 2026 Stephen Olesen.