open-index/open-npm huggingface dataset:
npm package: @simbo/inject-between-html-comments
Description: Inject content between HTML comment markers inside a string.
Author: Simon Lepel
Latest version: 1.0.4

# Inject Between HTML Comments

📦
[**`@simbo/inject-between-html-comments`**](https://npmjs.com/package/@simbo/inject-between-html-comments)

Inject content between HTML comment markers inside a string.

Useful for markdown manipulation, code generation, documentation updates, or
template modifications where placeholders are wrapped in comments.

## Features

- Replace content between all occurrences of matching HTML comment blocks

- Supports custom comment names (e.g., `<!-- INJECT:foo -->` …
  `<!-- /INJECT:foo -->`)

- Configurable options for inline vs. block insertion

- Optional trimming of injected content

- Fully typed with TypeScript

## Installation

Install `@simbo/inject-between-html-comments` from the npm registry:

```bash
npm i [-D] @simbo/inject-between-html-comments
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_inject-between-html-comments/).

### Example

```ts
import { injectBetweenHtmlComments } from '@simbo/inject-between-html-comments';

const content = `
# A Document

<!-- INJECT -->

Generated content.

<!-- /INJECT -->
`;

const result = injectBetweenHtmlComments(content, 'Hello World!');

/*
# A Document

<!-- INJECT -->

Hello World!

<!-- /INJECT -->
*/
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/is-git-repository-root
Description: A lightweight utility for checking whether a directory is the root of a Git repository.
Author: Simon Lepel
Latest version: 1.0.1

# Is Git Repository Root

📦
[**`@simbo/is-git-repository-root`**](https://npmjs.com/package/@simbo/is-git-repository-root)

A lightweight utility for checking whether a directory is the root of a Git
repository.

It simply checks for the presence of a `.git` folder in the given directory.

## Features

- Detects if a directory is the root of a Git repository

- Defaults to checking the **current working directory**

- Async and Promise-based API

- Fully typed with TypeScript

- Zero dependencies (besides other `@simbo/*` packages)

⚠️ Git submodules and worktrees are not considered repository roots.

## Installation

Install `@simbo/is-git-repository-root` from the npm registry:

```bash
npm i [-D] @simbo/is-git-repository-root
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_is-git-repository-root/).

### Example

```ts
import { isGitRepositoryRoot } from '@simbo/is-git-repository-root';

if (await isGitRepositoryRoot()) {
  console.log('This is a Git repository root.');
}

if (await isGitRepositoryRoot('/path/to/dir')) {
  console.log('That directory is a Git repository root.');
}
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/monorepo-utils
Description: A set of utilities for inspecting and working with monorepo workspaces.
Author: Simon Lepel
Latest version: 1.0.6

# Monorepo Utilities

📦
[**`@simbo/monorepo-utils`**](https://npmjs.com/package/@simbo/monorepo-utils)

A set of utilities for inspecting and working with **monorepo workspaces**.

Includes functions for reading workspace metadata, resolving paths, and working
with package manifests.

## Features

- Detect and read all workspaces in a repository

- Supports workspace patterns from different monorepo setups:
  - [pnpm](https://pnpm.io/) (`pnpm-workspace.yaml`)
  - [npm](https://docs.npmjs.com/cli/v11/using-npm/workspaces) (`package.json`)

- Validate and parse workspaces' `package.json` files

- Extract metadata such as name, version, description, and README title

- Manage concurrency when scanning large monorepos

- Fully typed with TypeScript

## Installation

Install `@simbo/monorepo-utils` from the npm registry:

```bash
npm i [-D] @simbo/monorepo-utils
```

## Related Packages

- [`@simbo/monorepo-packages-list`](https://npmjs.com/package/@simbo/monorepo-packages-list)
- [`@simbo/monorepo-packages-list-cli`](https://npmjs.com/package/@simbo/monorepo-packages-list-cli)

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_monorepo-utils/).

### Examples

#### Read All Workspaces

Concurrently find and read all workspaces in a monorepo.

Returns an array of [`WorkspaceMetadata`] objects.

```ts
import { readWorkspaces } from '@simbo/monorepo-utils';

const workspaces = await readWorkspaces();
```

#### Get Metadata for a Workspace Path

Get the [`WorkspaceMetadata`] for a workspace path.

```ts
import { getWorkspaceMetadata } from '@simbo/monorepo-utils';

const metadata = await getWorkspaceMetadata('my-workspace');
```

#### Get Workspace Paths

Get all workspace paths in a monorepo.

Returns an array of path strings.

```ts
import { getWorkspacePaths } from '@simbo/monorepo-utils';

const paths = await getWorkspacePaths();
```

#### Get Workspace Patterns

Get all workspace patterns in a monorepo.

Returns an array of pattern strings.

```ts
import { getWorkspacePatterns } from '@simbo/monorepo-utils';

const patterns = await getWorkspacePatterns();
```

#### Get Package Path by Name

Get the file system path of a package by its name.

```ts
import { getPackagePath } from '@simbo/monorepo-utils';

const packagePath = await getPackagePath({ packageName: 'my-package' });
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)

[`WorkspaceMetadata`]:
  https://simbo.codes/packages/interfaces/_simbo_monorepo-utils.WorkspaceMetadata/
npm package: @simbo/package-json
Description: A set of utilities for working with package.json files.
Author: Simon Lepel
Latest version: 0.1.3

# Package Utilities

📦 [**`@simbo/package-json`**](https://npmjs.com/package/@simbo/package-json)

A set of utilities for working with package.json files.

## Installation

Install `@simbo/package-json` from the npm registry:

```bash
npm i [-D] @simbo/package-json
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_package-json/).

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/plural
Description: A utility for pluralizing words based on a count.
Author: Simon Lepel
Latest version: 1.0.1

# Plural

📦 [**`@simbo/plural`**](https://npmjs.com/package/@simbo/plural)

A lightweight utility for pluralizing words based on a count.

It supports irregular forms and custom output formatting.

## Features

- Pluralize words automatically (adds "s" by default).

- Handle irregular plural forms (e.g., "child" → "children").

- Flexible output templates with placeholders for count and word.

- Fully typed API with TypeScript support.

- Zero dependencies.

## Installation

Install `@simbo/plural` from the npm registry:

```bash
npm i [-D] @simbo/plural
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_plural/).

### Examples

```ts
import { plural } from '@simbo/plural';

// Default pluralization
plural(1, 'Apple'); // -> "1 Apple"
plural(2, 'Apple'); // -> "2 Apples"

// Irregular plurals
plural(1, 'Child', 'Children'); // -> "1 Child"
plural(2, 'Child', 'Children'); // -> "2 Children"

// Custom templates
plural(1, 'Package', undefined, '**%d** 📦 %s');
// -> "**1** 📦 Package"
plural(2, 'Package', undefined, '**%d** 📦 %s');
// -> "**2** 📦 Packages"

// Contextual sentences
plural(1, 'Person', 'People', 'There is %d %s here.');
// -> "There is 1 Person here."
plural(2, 'Person', 'People', 'There are %d %s here.');
// -> "There are 2 People here."

// Reusing template output
let output = '%d %s (%d %s)';
output = plural(2, 'Directory', 'Directories', output);
// -> "2 Directories (%d %s)"
output = plural(3, 'File', undefined, output);
// -> "2 Directories (3 Files)"
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/prettier-config
Description: Simbo's shared Prettier configuration.
Author: Simon Lepel
Latest version: 2.0.0

# Simbo's Prettier Configuration

📦
[**`@simbo/prettier-config`**](https://npmjs.com/package/@simbo/prettier-config)

A shared [Prettier](https://prettier.io/) configuration.

## Installation

Install Prettier, the required plugins, and the `@simbo/prettier-config` from
the npm registry:

```bash
npm i -D prettier @ianvs/prettier-plugin-sort-imports prettier-plugin-organize-attributes @simbo/prettier-config
```

## Usage

Create a [Prettier configuration file](https://prettier.io/docs/configuration)
in the root of your project.

```bash
echo '"@simbo/prettier-config"' > .prettierrc
```

Add `prettier` commands to your `package.json` scripts:

```json
    "check:format": "prettier --check .",
    "fix:format": "prettier --write .",
```

And your done. 🍻

### Example `.prettierrc`

```json
"@simbo/prettier-config"
```

### Example `.prettierrc.js`

Extending the shared configuration is only possible using JavaScript or
TypeScript.

```js
import simboPrettierConfig from '@simbo/prettier-config';

/**
 * @see https://prettier.io/docs/configuration
 * @type {import("prettier").Config}
 */
export default {
  ...simboPrettierConfig,
  // add custom settings here
};
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/rollup-github-actions-config
Description: A rollup configuration for building GitHub Actions written in TypeScript/ESM.
Author: Simon Lepel
Latest version: 1.0.2

# Rollup GitHub Actions Config

📦
[**`@simbo/rollup-github-actions-config`**](https://npmjs.com/package/@simbo/rollup-github-actions-config)

A rollup configuration for building GitHub Actions written in TypeScript/ESM.

## Installation

Install `@simbo/rollup-github-actions-config` from the npm registry:

```bash
npm i -D @simbo/rollup-github-actions-config
```

## Usage

Create a `rollup.config.js` file in your project root:

```js
import { getConfig } from '@simbo/rollup-github-actions-config';

export default getConfig();
```

In your `package.json`, add a build script:

```json
    "build": "rollup -c"
```

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_rollup_github_actions_config/).

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/stringify-error
Description: A lightweight utility that converts any error-like value into a safe, human-readable string.
Author: Simon Lepel
Latest version: 1.0.2

# Stringify Error

📦
[**`@simbo/stringify-error`**](https://npmjs.com/package/@simbo/stringify-error)

A lightweight utility that converts any error-like value into a safe,
human-readable string.

Designed for robust error handling in logs, CLI output, or user-facing messages.

## Features

- Handles any input type (`unknown`) gracefully

- Extracts message from `Error` objects

- Falls back to `toString()` where available

- Provides meaningful defaults for non-standard values

- Fully typed with TypeScript

- Zero dependencies

## Installation

Install `@simbo/stringify-error` from the npm registry:

```bash
npm i [-D] @simbo/stringify-error
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_stringify-error/).

### Example

Use `stringifyError` in your error handling:

```ts
import { stringifyError } from '@simbo/stringify-error';

try {
  // Some things that may throw
} catch (error: unknown) {
  console.error(`Failed: ${stringifyError(error)}`);
}
```

### Input and Output

The following table is a simplified view of how `stringifyError` tests the input
and creates respective output:

| Input (`error: unknown`)            | Output (`string`)                                |
| ----------------------------------- | ------------------------------------------------ |
| Object with a `message` string      | `error.message`                                  |
| Object with a `toString` method     | `error.toString()`                               |
| Other object                        | `` `Unknown Error (${JSON.stringify(error)})` `` |
| Non-string primitive (number, etc.) | `` `Unknown Error (${String(error)})` ``         |
| Empty string                        | `` `Unknown Error ("")` ``                       |
| Non-empty string                    | `error`                                          |

## Related Packages

- [@simbo/clirk](https://npmjs.com/package/@simbo/clirk)
- [@simbo/graceful-exit](https://npmjs.com/package/@simbo/graceful-exit)
- [@simbo/user-facing-error](https://npmjs.com/package/@simbo/user-facing-error)

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/stylus-mixins
Description: A personal collection of Stylus mixins.
Author: Simon Lepel
Latest version: 0.1.0

stylus-mixins
=============

  > A personal collection of Stylus mixins.

[![npm package version](https://img.shields.io/npm/v/@simbo/stylus-mixins.svg?style=flat-square)](https://www.npmjs.com/package/@simbo/stylus-mixins)
[![Travis CI build status](https://travis-ci.org/simbo/stylus-mixins.svg?branch=master)](https://travis-ci.org/simbo/stylus-mixins/builds)

---


## Installation

`stylus-mixins` is a user scoped npm package. You can install it…

``` sh
# …using npm
npm install @simbo/stylus-mixins
# …or yarn
yarn add @simbo/stylus-mixins
```


## Usage

``` stylus
/* require all mixins… */
@require 'path/to/node_modules/stylus-mixins'

/* …or only those you need… */
@require 'path/to/node_modules/stylus-mixins/mixins/md-shadow'

/* …and call them where needed: */
.my-container
  mdShadow()
```


## Mixins


### `mdShadow($depth = 2, $multiplier = 1, $inset = false)`

Material design shadows with umbra, penumbra and ambient shadow

[./mixins/md-shadow](./mixins/md-shadow.styl)


### `ratioExpander($ratio = 1)`

Creates a peudo element expander to maintain aspect ratio

[./mixins/ratio-expander](./mixins/ratio-expander.styl)


### `textEllipsis()``

Ellipsis overflow for single-line text

[./mixins/text-ellipsis](./mixins/text-ellipsis.styl)


## License

[MIT &copy; Simon Lepel](http://simbo.mit-license.org/)
npm package: @simbo/tsconfig
Description: Simbo's shared TypeScript configurations.
Author: Simon Lepel
Latest version: 1.0.4

# Simbo's TypeScript Configurations

📦 [**`@simbo/tsconfig`**](https://npmjs.com/package/@simbo/tsconfig)

Shared TypeScript configurations.

## Installation

Install `@simbo/tsconfig` from the npm registry:

```bash
npm i -D @simbo/tsconfig
```

## Extendable Configurations

- `@simbo/tsconfig/base` Base configuration (see
  [tsconfig.base.json](./tsconfig.base.json))

- `@simbo/tsconfig/node` Node.js specific configuration (see
  [tsconfig.node.json](./tsconfig.node.json))

- `@simbo/tsconfig/browser` Browser specific configuration (see
  [tsconfig.browser.json](./tsconfig.browser.json))

## Example

In your `tsconfig.json`:

```json
{
  "extends": "@simbo/tsconfig/node",
  "compilerOptions": {
    // add custom settings here
  }
}
```

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/user-facing-error
Description: A custom Error class for creating user-facing error messages with an optional hint to guide users toward resolving issues.
Author: Simon Lepel
Latest version: 1.0.2

# User Facing Error

📦
[**`@simbo/user-facing-error`**](https://npmjs.com/package/@simbo/user-facing-error)

A custom `Error` class for creating **user-facing error messages**.

It supports additional _hints_ to guide users toward resolving issues, while
maintaining full compatibility with standard JavaScript `Error` behavior.

## Features

- Extends the native `Error` class
- Includes an optional hint (`string` or `true` for a generic hint)
- Supports
  [standard `ErrorOptions`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error#options)
  including `cause`
- Static `from` method for wrapping other errors with a new message
- Fully typed TypeScript API
- One dependency
  ([`@simbo/stringify-error`](https://npmjs.com/package/@simbo/stringify-error))

## Installation

Install `@simbo/user-facing-error` from the npm registry:

```bash
npm i [-D] @simbo/user-facing-error
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_user-facing-error/).

### Examples

```ts
import { UserFacingError } from '@simbo/user-facing-error';

// Creating the simplest user-facing error:
throw new UserFacingError('Operation cancelled');

// Creating a basic user-facing error with a hint:
throw new UserFacingError('Invalid input', 'Use --help for usage information');

// Adding a generic hint:
// (You have to provide a hint when catching this error.)
throw new UserFacingError('Command failed', true);

// Using another error (or anything else) as `cause`:
const cause = new Error('Underlying error');
throw new UserFacingError('Top-level error', {
  cause,
  hint: 'Retry with valid credentials',
});

// Wrapping another error:
try {
  // some failing operation
} catch (err) {
  throw UserFacingError.from(
    err,
    'Operation failed',
    'Check your network connection',
  );
}
```

## Related Packages

- [@simbo/clirk](https://npmjs.com/package/@simbo/clirk)
- [@simbo/graceful-exit](https://npmjs.com/package/@simbo/graceful-exit)
- [@simbo/stringify-error](https://npmjs.com/package/@simbo/stringify-error)

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simbo/zodpak
Description: A collection of utilities for Zod.
Author: Simon Lepel
Latest version: 0.1.4

# Zodpak

📦 [**`@simbo/zodpak`**](https://npmjs.com/package/@simbo/zodpak)

A collection of utilities for Zod.

## Installation

Install `zod`, `zod-validation-error`, and `@simbo/zodpak` from the npm
registry:

```bash
npm i [-D] zod zod-validation-error @simbo/zodpak
```

## Usage

For a complete API reference, see the
[documentation](https://simbo.codes/packages/modules/_simbo_zodpak/).

## License

[MIT © Simon Lepel](http://simbo.mit-license.org/2025/)
npm package: @simboonlong/word-cli
Description: Command line interface to get useful information from a chunk of text.
Author: Sim Boon Long
Latest version: 2.2.0

[![CI/CD](https://github.com/simboonlong/word-cli/actions/workflows/manual.yml/badge.svg)](https://github.com/simboonlong/word-cli/actions/workflows/manual.yml)

# Word CLI

Command line interface to get useful information from a chunk of text.

## Install

```
npm i -g @simboonlong/word-cli
```

or

```
npx -p @simboonlong/word-cli word <command> <arguments>
```

## Demo

Example:

```
npx -p @simboonlong/word-cli word count 'foobar in hello world!'
```

The above word count should return 4.

---

### Count

Count total words.

```
word count 'foobar in hello world!'
```

<!-- npm run dev -- count 'foobar in hello world!' -->

Count total characters.

```
word count 'foobar in hello world!' --character
```

<!-- npm run dev -- count 'foobar in hello world!' -c -->

### Occur

Count total occurrences of word in text.

```
word occur 'foobar in hello world!' --string foobar
```

<!-- npm run dev -- occur 'foobar in hello world!' -s foobar -->

Count total occurrences of character in text.

```
word occur 'foobar in hello world!' --string l --character
```

<!-- npm run dev -- occur 'foobar in hello world!' -s l -c -->