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

v0.3.0

Published

Deterministic locale-correct valedictions for formal correspondence. Mirrors the cfarewell Rust crate release line.

Downloads

925

Readme

cfarewell

The right closing line for a formal letter.

crates.io npm PyPI Rust API

Choose a valediction from 40 locale entries, including Swiss German, British English, French, and Japanese. Explicit wording always takes precedence over table defaults. No model or network calls.

import { closing } from '@corbet-labs/cfarewell';

closing('de-ch');
// Freundliche Grüsse

Install

| Environment | Command | | --- | --- | | Rust / Cargo | cargo add cfarewell | | Python / pip | python -m pip install cfarewell | | Python / uv | uv add cfarewell | | Node.js / npm | npm install @corbet-labs/cfarewell | | pnpm | pnpm add @corbet-labs/cfarewell | | Yarn | yarn add @corbet-labs/cfarewell | | Bun | bun add @corbet-labs/cfarewell | | Deno | deno add npm:@corbet-labs/cfarewell |

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 { closing } = require('@corbet-labs/cfarewell');
<script type="module">
  import { closing } from 'https://cdn.jsdelivr.net/npm/@corbet-labs/[email protected]/dist/browser.js';
  console.log(closing('de-ch'));
</script>

Python 3.10+ packages are available on PyPI. See the installation guide for CLI commands and other distribution options. JSR publication and Typst availability are listed there explicitly.

Rust

use cfarewell::closing;

assert_eq!(closing("de-ch", None), "Freundliche Grüsse");
assert_eq!(closing("en-gb", None), "Yours sincerely,");

Python

from cfarewell import closing

assert closing("de-ch") == 'Freundliche Grüsse'

API

| Function | Purpose | | --- | --- | | closing(locale, override?) | Resolve a valediction; even an empty override wins | | availableLocales() / available_locales() | List the 39 canonical locale codes |

Locale matching is case-insensitive. Resolution tries the exact locale, then its base language, then English: fr-befr, xxen. An override is returned unchanged, including an empty string. The locale table owns punctuation, so callers should not append another comma.

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/cfarewell/blob/main/LICENSES/LGPL-3.0-only%20WITH%20LGPL-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. Previously released and already prepared distributions retain their original grants. The installation examples above refer to those available releases; 0.3.0 has not yet been published to registries.

See the licensing notes for distribution conditions and retained notices.