open-index/open-npm huggingface dataset:
npm package: @protocorelabs/sum
Description: A simple and lightweight utility to add two numbers.
Latest version: 1.0.3

# @protocorelabs/sum

A simple and lightweight utility to add two numbers.

---

## 📦 Installation

```bash
npm install @protocorelabs/sum
```

---

## 🚀 Usage

### JavaScript (CommonJS)

```js
const sum = require("@protocorelabs/sum");

console.log(sum(5, 3)); // 8
```

---

### TypeScript / ES Module

```ts
import sum from "@protocorelabs/sum";

console.log(sum(10, 2)); // 12
```

---

## 📌 API

### `sum(a, b)`

| Parameter | Type   | Description   |
| --------- | ------ | ------------- |
| a         | number | First number  |
| b         | number | Second number |

**Returns:**
👉 `number` — sum of `a + b`

---

## ⚠️ Validation (Optional Example)

```ts
import sum from "@protocorelabs/sum";

sum(1, 2); // 3
sum("1", 2); // ❌ avoid non-number inputs
```

---

## 📁 Project Structure

```
src/
  index.ts
dist/
  index.js
  index.d.ts
```

---

## 🛠️ Development

```bash
npm install
npm run build
```

---

## 🚀 Publish

```bash
npm publish --access public
```

---

## 📄 License

MIT © Protocore Labs

---