open-index/open-npm huggingface dataset:
npm package: @subramanyam8274/demo-package
Description: A simple demo package for npm publish testing
Author: Subramanyam Ganta
Latest version: 1.0.2

# Demo Package

A very simple npm package for testing npm publish workflow.

## Installation

```bash
npm install @subramanyam/demo-package
```

## Development

```bash
# Install dependencies
npm install

# Build the package (generates both CommonJS and ES module outputs)
npm run build
```

## Usage

### CommonJS (require)

```javascript
const { greet, add } = require('@subramanyam/demo-package');

// Use the greet function
console.log(greet('World')); // Output: Hello, World! Welcome to the demo package.

// Use the add function
console.log(add(5, 3)); // Output: 8
```

### ES Modules (import)

```javascript
// Named imports
import { greet, add } from '@subramanyam/demo-package';

// Use the greet function
console.log(greet('World')); // Output: Hello, World! Welcome to the demo package.

// Use the add function
console.log(add(5, 3)); // Output: 8
```

```javascript
// Default import
import demoPackage from '@subramanyam/demo-package';

console.log(demoPackage.greet('World'));
console.log(demoPackage.add(5, 3));
```

## API

### `greet(name)`

Returns a greeting message.

- **name** (string): The name to greet
- **Returns**: A greeting string

### `add(a, b)`

Adds two numbers together.

- **a** (number): First number
- **b** (number): Second number
- **Returns**: Sum of the two numbers

## License

MIT