open-index/open-npm huggingface dataset:
npm package: 0http
Description: Zero friction HTTP request router. The need for speed!
Author: Rolando Santamaria Maso
Latest version: 4.4.0

# Introduction
[![NPM version](https://badgen.net/npm/v/0http)](https://www.npmjs.com/package/0http)
[![NPM Total Downloads](https://badgen.net/npm/dt/0http)](https://www.npmjs.com/package/0http)
[![License](https://badgen.net/npm/license/0http)](https://www.npmjs.com/package/0http)
[![TypeScript support](https://badgen.net/npm/types/0http)](https://www.npmjs.com/package/0http)
[![Github stars](https://badgen.net/github/stars/jkyberneees/0http?icon=github)](https://github.com/jkyberneees/0http)

<img src="docs/0http-logo.svg" width="400">  

Zero friction HTTP framework:
- Tweaked Node.js HTTP server for high throughput.
- High-performance and customizable request routers. 

![Performance Benchmarks](docs/Benchmarks.png)

> Check it yourself: https://web-frameworks-benchmark.netlify.app/result?f=feathersjs,0http,koa,fastify,nestjs-express,express,sails,nestjs-fastify,restana

## Installation

Install the package from npm:

```bash
npm install 0http
```

## Usage
```js
const cero = require('0http')
const { router, server } = cero()

router.get('/hello', (req, res) => {
  res.end('Hello World!')
})

router.post('/do', (req, res) => {
  // ...
  res.statusCode = 201
  res.end()
})

//...

server.listen(3000)
```

# Support / Donate 💚
You can support the maintenance of this project: 
- PayPal: https://www.paypal.me/kyberneees
- [TRON](https://www.binance.com/en/buy-TRON) Wallet: `TJ5Bbf9v4kpptnRsePXYDvnYcYrS5Tyxus`

# More
- Website and documentation: https://0http.21no.de
npm package: 0i0
Description: use redux like api, but achieve context like api nested in component
Author: shenxiang.feng
Latest version: 0.0.31

# 0i0

use redux like api, but achieve context like api nested in component

## demo

https://codesandbox.io/s/0i0-yq1n3

## how to use

### install

```bash
yarn add 0i0
```

#### it need a root just like Context

```tsx
import React, { useState } from "react";
import Num1 from "./num1";
import Num2 from "./num2";
import { Provider } from "0i0";

export default function App() {
  const [num1, setNum1] = useState(0);
  const [num2, setNum2] = useState(0);
  return (
    <Provider
      value={{
        num1,
        setNum1,
        num2,
        setNum2
      }}
    >
      <Num1 />
      <Num2 />
    </Provider>
  );
}
```

#### Select state in fuction component:

```tsx
import React, { memo } from "react";
import { useSelector } from "0i0";

function Num2() {
  console.log("i am rendering");
  const num2 = useSelector((state) => state.num2);
  const setNum2 = useSelector((state) => state.setNum2);
  return (
    <div>
      {num2}
      <button onClick={() => setNum2((num) => num + 1)}>num2 add one</button>
    </div>
  );
}

export default memo(Num2);
```

#### select state in class component:

```tsx
import React, { memo } from "react";
import { connect } from "0i0";

class Num1 extends React.Component {
  render() {
    console.log("i am rendering");
    const { num1, setNum1 } = this.props;
    return (
      <div>
        {num1}
        <button onClick={() => setNum1((num) => num + 1)}>
          {" "}
          num1 add one{" "}
        </button>
      </div>
    );
  }
}

export default memo(connect(({ num1, setNum1 }) => ({ num1, setNum1 }))(Num1));

```

### todo

- [ ] test case
- [ ] CICD
- [x] Fix  Cannot update a component problem
npm package: 0inspect
Description: Pretty string representation of object
Author: Ambratolm
Latest version: 0.0.2

# 👀 0inspect

[![NPM version](https://badge.fury.io/js/0inspect.svg)](https://npmjs.org/package/0inspect)

Simple utility for displaying a pretty eye-friendly colorful representation of an object for inspection purposes 👮.

![Screenshot](./screenshot.jpg?raw=true)

## 📥 Install

```
npm i 0inspect
```

## 🏁 Use

```js
const inspect = require("0inspect");
// or const { inspect, log } = require("0inspect");

const objString = inspect(someObj);
console.log(objString);

// or shorter
inspect.log(someObj);
```

## 📕 API

`inspect(obj?: Any, options?: Object);`

- `obj: Any`: Object to inspect.
- `options: Object`: Options object.
  - `depth: Number`: Object nesting depth. _Default: `10`_.

`inspect.log(obj?: Any, options?: Object);`

- Just a wrapper for `console.log(inspect(obj, options))`.

## 🎨 Colors

| Color   | Meaning          |
| ------- | ---------------- |
| Green   | Truthy Primitive |
| Red     | Falsy Primitive  |
| Cyan    | Full Object      |
| Yellow  | Empty Object     |
| Magenta | Function         |

As this is using [Chalk](https://github.com/chalk) for console colors, the color support control is automatic, but you can still override it this way:

```js
const chalk = require("chalk"); // Chalk v4.1.2
chalk.level = 0; // No color
```

💡 See: [chalk # chalk.level](https://github.com/chalk/chalk#chalklevel)

## 🔣 Symbols

| Symbol | Meaning          |
| ------ | ---------------- |
| ◆      | Truthy Primitive |
| ◇      | Falsy Primitive  |
| ●      | Full Object      |
| ○      | Empty Object     |
| ◉      | Function         |
| Ø      | No Class         |
| →      | Value            |

## 💠 Examples

| Input       | Category         | Output                       | Output Color |
| ----------- | ---------------- | ---------------------------- | ------------ |
| `1n`        | Truthy Primitive | `◆ BigInt → 1`               | Green        |
| `NaN`       | Falsy Primitive  | `◇ Number → NaN`             | Red          |
| `undefined` | Falsy Primitive  | `◇ Ø → undefined`            | Red          |
| `{ a:"" }`  | Full Object      | `● Object → {1}`             | Cyan         |
| `{}`        | Empty Object     | `○ Object → {}`              | Yellow       |
| `() => ""`  | Function         | `◉ Function → (anonymous)()` | Magenta      |

# 📃 License

[MIT](./LICENSE) © [Ambratolm](https://github.com/Ambratolm)