open-index/open-npm huggingface dataset:
npm package: @syedjon/simple-word-counter
Description: A simple app that returns the total count of words or a custom word
Author: SyedJoN
Latest version: 2.0.1

# 🧮 @syedjon/simple-word-counter

A simple and lightweight Node.js CLI tool to **count total words in a file** — and optionally count the occurrences of a **specific word**.  
Works with both **CommonJS** and **ESM** environments.

---

## 🚀 Features

- 📄 Count all words in any file.  
- 🔍 Optionally count how many times a specific word appears.  
- 💪 Compatible with **CommonJS (`require`)** and **ESM (`import`)**.  
---

## 📦 Installation

### Global (recommended for CLI use)
```bash
npm install -g @syedjon/simple-word-counter
```
## 📦 Usage (CLI)
```bash
wcount <file-path> [word]
```
npm package: @syedrehaman/uikit
Description: A UI component library
Author: Syed Rehaman
Latest version: 0.0.3

# @syedrehaman/uikit

A lightweight React UI kit powered by Tailwind CSS. Currently includes a flexible `Text` component for consistent typography.

## Installation

Install the package and its peer dependencies:

```bash
npm install @syedrehaman/uikit react react-dom
```

(You also need Tailwind configured in your host app. See below.)

## Tailwind Setup (Host Project)
If you haven't already set up Tailwind CSS in the consuming project:

```bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```

`tailwind.config.js` minimal example:
```js
/** @type {import('tailwindcss').Config} */
export default {
  content: [
    './index.html',
    './src/**/*.{js,ts,jsx,tsx}',
    './node_modules/@syedrehaman/uikit/dist/**/*.{js,ts}'
  ],
  theme: {
    extend: {
      colors: {
        primary: {
          400: '#6366f1',
          600: '#4f46e5'
        }
      }
    }
  },
  plugins: []
}
```

In your global CSS (e.g. `src/index.css`):
```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```

## Usage
```tsx
import { Text } from '@syedrehaman/uikit';

export function Example() {
  return (
    <div className="space-y-2">
      <Text size="xl" weight="semibold">Heading XL</Text>
      <Text size="lg" color="muted">Muted large body text</Text>
      <Text as="p" size="sm" color="primary" weight="medium">Primary small</Text>
      <Text as="p" truncate className="w-40">This is a long line that will truncate</Text>
    </div>
  );
}
```

### Text Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `as` | `React.ElementType` | `'span'` | Underlying element tag/component |
| `size` | `'xs'|'sm'|'base'|'md'|'lg'|'xl'|'2xl'|'3xl'` | `'base'` | Font sizing presets |
| `weight` | `'light'|'normal'|'medium'|'semibold'|'bold'` | `'normal'` | Font weight |
| `color` | `'default'|'muted'|'primary'|'danger'|'success'|'warning'` | `'default'` | Color style |
| `nowrap` | `boolean` | `false` | Prevent wrapping |
| `truncate` | `boolean` | `false` | Apply single-line truncation |
| `className` | `string` | – | Additional utility classes |

## Development
Local build:
```bash
npm run build
```

Story / playground via Vite:
```bash
npm run dev
```

## Publishing (Maintainers)
1. Ensure you are logged in: `npm login`
2. Bump version in `package.json` (respect semver)
3. Run: `npm run release`

The script builds and publishes with `--access public`.

## License
MIT © Syed Rehaman
npm package: @syedt/react-native-batterykit
Description: Cross-platform battery utilities for React Native apps.
Author: syed-tp
Latest version: 0.1.1

# react-native-batterykit

Cross-platform battery utilities for React Native apps.

## Installation


```sh
npm install react-native-batterykit
```


## Usage


```js
import { BatteryKit } from 'react-native-batterykit';

// ...
const batteryLevel = BatteryKit.getBatteryLevel();
const isCharging = BatteryKit.isCharging();

BatteryKit.getBatteryLevelAsync()
  .then((level) => {
    console.log(`Battery level: ${level}%`);
  })
  .catch((error) => {
    console.error('Error getting battery level:', error);
  });

```


## Contributing

- [Development workflow](CONTRIBUTING.md#development-workflow)
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
- [Code of conduct](CODE_OF_CONDUCT.md)

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @syedt/react-native-videokit
Description: native video kit for playback
Author: syed-tp
Latest version: 0.1.0

# react-native-videokit

native video kit for playback

## Installation


```sh
npm install react-native-videokit
```


## Usage


```js
import { VideoKitView } from "react-native-videokit";

// ...

<VideoKitView color="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />
```


## Contributing

- [Development workflow](CONTRIBUTING.md#development-workflow)
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
- [Code of conduct](CODE_OF_CONDUCT.md)

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @syeedalireza/bid-stream
Description: Professional reverse auction package
Author: Alireza Aminzadeh
Latest version: 1.0.0

# @syeedalireza/bid-stream

A high-performance WebSocket/Redis adapter optimized for broadcasting "lowest bid" updates in real-time reverse auctions.

## Features
- **Redis Pub/Sub**: Leverages Redis for scalable, distributed message broadcasting.
- **Event Emitter**: Simple Node.js EventEmitter interface for handling incoming bids.
- **Auction-Specific Channels**: Automatically routes bids to specific auction channels.
- **TypeScript Support**: Fully typed with TypeScript.

## Installation

```bash
npm install @syeedalireza/bid-stream ioredis
```

## Usage

```typescript
import { BidStream } from '@syeedalireza/bid-stream';

// Initialize the stream
const stream = new BidStream({
  redisUrl: 'redis://localhost:6379',
  channelPrefix: 'auction:', // Optional, defaults to 'auction:'
});

// Subscribe to a specific auction
await stream.subscribeToAuction('auction-123');

// Listen for all bids
stream.on('bid', (bid) => {
  console.log('Received bid:', bid);
});

// Listen for bids on a specific auction
stream.on('bid:auction-123', (bid) => {
  console.log('Received bid for auction-123:', bid);
});

// Broadcast a new bid
await stream.broadcastBid({
  auctionId: 'auction-123',
  bidId: 'bid-1',
  bidderId: 'user-1',
  amount: 100,
  timestamp: Date.now(),
});

// Cleanup when done
await stream.disconnect();
```

## API

### `BidStream`

#### Constructor
`new BidStream(config: BidStreamConfig)`
- `config.redisUrl`: Redis connection string.
- `config.channelPrefix`: Prefix for Redis channels (default: `'auction:'`).

#### Methods
- `subscribeToAuction(auctionId: string): Promise<void>`: Subscribes to updates for a specific auction.
- `unsubscribeFromAuction(auctionId: string): Promise<void>`: Unsubscribes from an auction.
- `broadcastBid(bid: BidMessage): Promise<void>`: Broadcasts a bid to all subscribers of that auction.
- `disconnect(): Promise<void>`: Closes Redis connections.

#### Events
- `'bid'`: Emitted for any received bid. Payload: `BidMessage`.
- `'bid:[auctionId]'`: Emitted for bids specific to `auctionId`. Payload: `BidMessage`.
- `'error'`: Emitted on JSON parsing errors or Redis errors. Payload: `Error`.
npm package: @syeedalireza/reverse-auction-engine
Description: Professional reverse auction package
Author: Alireza Aminzadeh
Latest version: 1.0.0

# @syeedalireza/reverse-auction-engine

A robust, predictable finite state machine and core engine for Reverse Auctions.

## Architecture

```mermaid
graph TD
    Client[Client Request] --> Engine[ReverseAuctionEngine]
    Engine --> Validation{Validate Bid}
    Validation -->|Invalid| Error[Throw Error]
    Validation -->|Valid| Lock[Acquire Distributed Lock]
    Lock --> Storage[IStorageAdapter]
    Storage -->|Save| DB[(Database / Redis / Memory)]
```

## Features
- **State Management**: Predictable transitions between DRAFT, ACTIVE, and CLOSED states.
- **Bid Validation**: Automatically rejects invalid bids (e.g., bids higher than current lowest).
- **Auto-Extension**: Automatically extends the auction end time if a bid is placed near the end (configurable threshold).
- **Storage Adapters**: Pluggable storage layer (Memory, Redis, DB) with distributed locking to prevent race conditions.
- **Custom Errors**: Uses custom error classes (`AuctionClosedError`, `InvalidBidError`) for better error handling.

## Installation

```bash
npm install @syeedalireza/reverse-auction-engine
```

## Usage

```typescript
import { ReverseAuctionEngine, MemoryStorageAdapter } from '@syeedalireza/reverse-auction-engine';

// You can inject your own Redis or DB adapter here
const storage = new MemoryStorageAdapter();

const engine = new ReverseAuctionEngine({
  id: 'auction-123',
  extensionTimeMs: 5 * 60 * 1000, // Extend by 5 minutes
  extensionThresholdMs: 2 * 60 * 1000, // If bid is placed within last 2 minutes
  storage
});

async function run() {
  // Start the auction
  const endTime = Date.now() + 60 * 60 * 1000; // 1 hour from now
  await engine.start(endTime);

  // Place a bid
  await engine.placeBid({
    id: 'bid-1',
    bidderId: 'user-1',
    amount: 100,
    timestamp: Date.now(),
  });

  console.log(await engine.getLowestBid());
}
```

## API

### `ReverseAuctionEngine`

#### Constructor
`new ReverseAuctionEngine(config: AuctionConfig)`
- `config.id`: Unique identifier for the auction.
- `config.extensionTimeMs`: Time to extend the auction by (in milliseconds). Default: 5 minutes.
- `config.extensionThresholdMs`: Threshold before end time to trigger an extension (in milliseconds). Default: 2 minutes.

#### Methods
- `start(endTime: number): void`: Starts the auction.
- `close(): void`: Manually closes the auction.
- `placeBid(bid: Bid): void`: Places a bid. Throws `InvalidBidError` or `AuctionClosedError`.
- `getState(): AuctionState`: Returns current state (`DRAFT`, `ACTIVE`, `CLOSED`).
- `getLowestBid(): Bid | null`: Returns the current lowest bid.
- `getEndTime(): number`: Returns the current end time.
- `getBids(): Bid[]`: Returns all placed bids.