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/cnice

v0.1.0

Published

Formulaic correspondence phrases: German salutations and locale-specific valedictions (cnice.greet + cnice.farewell). No models, no I/O: same input always yields the same output. Mirrors the cnice Rust crate release line.

Readme

cnice

Formulaic correspondence phrases: salutations and valedictions for every covered locale.

crates.io npm PyPI Rust API

cnice is a facade over two deterministic correspondence libraries: salutations (cnice.greet, previously the German-only cgreet repo) and locale-specific valedictions (cnice.farewell, previously cfarewell). One matcher renders every language from table rows — a new language is a new row, never new code. Same input always yields the same output: no models, no I/O.

import { farewell, greet } from '@corbet-labs/cnice';

greet.salutation('de-ch', 'Frau Dr. Müller');
// Sehr geehrte Frau Dr. Müller
greet.salutation('fr', 'Madame Dupont');
// Madame Dupont,
farewell.closing('de-ch');
// Freundliche Grüsse

Install

Version 0.1.0 has not yet been published to registries; the commands below resolve once published. A source manifest alone does not establish publication.

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

The 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 { greet, farewell } = require('@corbet-labs/cnice');
<script type="module">
  import { greet } from 'https://cdn.jsdelivr.net/npm/@corbet-labs/[email protected]/dist/browser.js';
  console.log(greet.salutation('de-ch', 'Frau Dr. Müller'));
</script>

See the installation guide for CLI commands and other distribution options. JSR installation is documented there too.

Rust

use cnice::{farewell, greet};

assert_eq!(greet::salutation("de-ch", "Frau Dr. Müller"), "Sehr geehrte Frau Dr. Müller");
assert_eq!(greet::salutation("fr", "Madame Dupont"), "Madame Dupont,");
assert_eq!(farewell::closing("de-ch", None), "Freundliche Grüsse");

Python

from cnice import farewell, greet

assert greet.salutation("de-ch", "Frau Dr. Müller") == 'Sehr geehrte Frau Dr. Müller'
assert greet.salutation("fr", "Madame Dupont") == 'Madame Dupont,'
assert farewell.closing("de-ch") == 'Freundliche Grüsse'

The Python CLI accepts bare and namespaced function names and writes JSON to stdout:

cnice greet.salutation '["de-ch", "Frau Dr. Müller"]'
cnice closing '["de-ch"]'
python -m cnice --help

API

| Function | Purpose | | --- | --- | | greet.salutation / greet.salutation / greet.salutation | Complete salutation for any covered locale | | greet.salutationHonorific, greet.salutationTitles, greet.salutationSurname | Parse explicitly supplied recipient details (locale-keyed) | | greet.isSupported / greet.is_supported / greet.is-supported | Whether a locale has a salutation row | | greet.recipientSalutationWarning, greet.honorificWarning | Report incomplete input | | farewell.closing(locale, override?) | Resolve a valediction; even an empty override wins | | farewell.availableLocales() / farewell.available_locales() / farewell.available-locales() | List the canonical locale codes |

Covered salutation locales: de, de-ch, de-at, de-li, fr, it, rm, en, en-gb, en-us. Comma behavior, title precedence and formal fallbacks are row data, identical on every port. A recognized Professor title takes precedence over Dr. Missing honorifics or surnames produce the formal fallback. The library does not infer a person’s gender from their name. Valediction lookups are case-insensitive and resolve the exact locale, then its base language, then English; an explicit override always wins.

Correspondence family

| Library | Responsibility | | --- | --- | | cletter | Compose the correspondence helpers | | cnice | Formulaic salutations and valedictions (this repo: cnice.greet + cnice.farewell) | | cdate | Calendar-date formatting | | cink | Handwritten signature images | | cgrade | Planned correspondence helper | | cnumber | Number formatting with Swiss amtlich mode | | cbcp | Planned correspondence helper |

Development

Behavior is defined by the locale tables and shared conformance vectors. Rust, JavaScript, Python, and Typst run the same vectors (74 greet + 57 farewell = 131). 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 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.1.0 release line is licensed under LGPL-3.0-only WITH LGPL-3.0-linking-exception, 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. The cgreet and cfarewell repositories keep their own release grants untouched; this facade does not relicense them.

See the licensing notes for distribution conditions and retained notices.