npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@corbet-labs/cgreet

v0.3.0

Published

Deterministic locale-correct greeting and salutation helpers. No models, no I/O: same input always yields the same output. Mirrors the cgreet Rust crate release line.

Readme

cgreet

German salutations with the right titles and punctuation.

crates.io npm PyPI Rust API

Turn an explicitly supplied honorific, academic titles, and surname into a formal salutation for Switzerland, Liechtenstein, Germany, or Austria. Deterministic rules, no model and no network calls.

import { deSalutation } from '@corbet-labs/cgreet';

deSalutation('Frau Dr. Müller', 'ch');
// Sehr geehrte Frau Dr. Müller

Install

| Environment | Command | | --- | --- | | Rust / Cargo | cargo add cgreet | | Python / pip | python -m pip install cgreet | | Python / uv | uv add cgreet | | Node.js / npm | npm install @corbet-labs/cgreet | | pnpm | pnpm add @corbet-labs/cgreet | | Yarn | yarn add @corbet-labs/cgreet | | Bun | bun add @corbet-labs/cgreet | | Deno | deno add npm:@corbet-labs/cgreet | | Typst | #import "@preview/cgreet:0.2.1": * |

The 0.2.1 JavaScript distribution includes compiled ESM, CommonJS, TypeScript declarations, and a standalone browser module. Node.js 20+ is supported; no TypeScript loader is required.

// CommonJS
const { deSalutation } = require('@corbet-labs/cgreet');
<script type="module">
  import { deSalutation } from 'https://cdn.jsdelivr.net/npm/@corbet-labs/[email protected]/dist/browser.js';
  console.log(deSalutation('Frau Dr. Müller', 'ch'));
</script>

Python 3.10+ packages are available on PyPI. See the installation guide for CLI commands and other distribution options. JSR installation is documented there too. The Typst interface is available on Typst Universe.

Rust

use cgreet::{de_salutation, Region};

assert_eq!(de_salutation("Frau Dr. Müller", Region::Ch), "Sehr geehrte Frau Dr. Müller");

Python

from cgreet import de_salutation

assert de_salutation("Frau Dr. Müller", "ch") == 'Sehr geehrte Frau Dr. Müller'

API

| Function | Purpose | | --- | --- | | deSalutation / de_salutation | Complete German salutation | | salutationHonorific, salutationTitles, salutationSurname | Parse explicitly supplied recipient details | | parseRegion / parse_region | Accept ch, li, de, or at | | recipientSalutationWarning, deHonorificWarning | Report incomplete input |

Region codes are lowercase. German and Austrian salutations end with a comma; Swiss and Liechtenstein salutations do not. A recognized Professor title takes precedence over Dr. Missing honorifics or surnames produce the generic greeting. The library does not infer a person’s gender from their name.

Correspondence family

| Library | Responsibility | | --- | --- | | cletter | Compose the correspondence helpers | | cgreet | German salutations and titles | | cfarewell | Locale-specific closings | | cdate | Calendar-date formatting | | cink | Handwritten signature images |

Development

Behavior is defined by the locale tables and shared conformance vectors. Rust, JavaScript, and Python run the same vectors. Selected CI checks exercise installed JavaScript tarballs, Python wheels and command-line entrypoints, and Typst packages. Release validation records the actual runtime and platform; Linux results do not establish native Windows or macOS coverage. All five Rust crates forbid unsafe code in their own source.

See the release guide for generation, verification, and publication commands.

License

Copyright 2026 Julian Y. Richard Corbet. The 0.3.0 release line is licensed under LGPL-3.0-only [WITH LGPL-3.0-linking-exception](https://github.com/corbet-labs/cgreet/blob/main/LICENSES/LGPL-3.0-only WITH LGPL-3.0-linking-exception.txt), with the incorporated GPL version 3. Combined works may link statically or dynamically without relinking duties; library modifications stay LGPL. Applications can use a different license subject to the LGPL's conditions. Versions 0.2.0 and 0.2.1 retain MIT OR Apache-2.0; version 0.1.0 and earlier retain their FSL-1.1-ALv2 grants. The installation examples above refer to available releases; 0.3.0 has not yet been published to registries.

See the licensing notes for distribution conditions and retained notices.