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

num-words-de

v2.0.0

Published

Convert Num/Int to equivalent String in German Language

Readme

num-words-de

Convert numbers to German words | Zahlen in deutsche Zahlwörter umwandeln

npm version License: MIT

Inspired by num-words.

  • ✅ TypeScript support
  • ✅ Numbers up to 12 digits (billions / Milliarden)
  • ✅ German indefinite article forms (ein, eine, einer, eines, einem)

🇬🇧 English

Description

num-words-de converts numbers (up to 12 digits) into their German word representation. TypeScript is supported.

Numbers with more than 12 digits are returned unchanged.

Installation

npm i num-words-de

Examples

| Input | Output | | -------------- | -------------------------------------------------------- | | 1 | Eins | | 10 | Zehn | | 13 | Dreizehn | | 1000 | Eintausend | | 22222 | Zweiundzwanzigtausendzweihundertzweiundzwanzig | | 1345000000 | Eine Milliarde dreihundertfünfundvierzig Millionen |

Usage

// CommonJS
const { numToWord } = require('num-words-de');
numToWord(1); // "Eins"

// ES Module / TypeScript
import { numToWord } from 'num-words-de';
numToWord(1); // "Eins"

Parameters

numToWord(number, params?) – The second argument is an optional object:

| Parameter | Type | Default | Description | | ------------------ | --------- | ------- | ------------------------------------------------------------------------ | | uppercase | boolean | true | Capitalize first letter (true) or return lowercase (false) | | indefinite_eine | boolean | false | Return eine for the number 1 (feminine nominative/accusative) | | indefinite_einer | boolean | false | Return einer for the number 1 (feminine genitive/dative) | | indefinite_eines | boolean | false | Return eines for the number 1 (neuter/masculine genitive) | | indefinite_einem | boolean | false | Return einem for the number 1 (masculine/neuter dative) | | indefinite_ein | boolean | false | Return ein for the number 1 (neuter nominative/accusative) |

The indefinite forms only affect the number 1. For all other numbers they are ignored.

numToWord(1);                                             // "Eins"
numToWord(10, { uppercase: false });                      // "zehn"
numToWord(1, { indefinite_eine: true });                  // "Eine"
numToWord(1, { indefinite_einer: true });                 // "Einer"
numToWord(1, { indefinite_eines: true });                 // "Eines"
numToWord(1, { indefinite_einem: true });                 // "Einem"
numToWord(1, { indefinite_ein: true });                   // "Ein"
numToWord(1, { indefinite_einem: true, uppercase: false }); // "einem"
numToWord(3, { indefinite_eine: true });                  // "Drei"

Error Handling

  • Non-numeric input returns the original value and logs console.error.
  • Numbers > 12 digits return the original value and logs console.error.

No exceptions are thrown – displaying the input is preferred over crashing the application.

Contributing

Found a bug? Feel free to open an Issue – please include the input value.


🇩🇪 Deutsch

Beschreibung

num-words-de wandelt Zahlen (bis zu 12 Stellen) in das entsprechende deutsche Zahlenwort um. TypeScript wird unterstützt.

Zahlen mit mehr als 12 Stellen werden unverändert als Zahl zurückgegeben.

Installation

npm i num-words-de

Beispiele

| Eingabe | Ausgabe | | -------------- | -------------------------------------------------------- | | 1 | Eins | | 10 | Zehn | | 13 | Dreizehn | | 1000 | Eintausend | | 22222 | Zweiundzwanzigtausendzweihundertzweiundzwanzig | | 1345000000 | Eine Milliarde dreihundertfünfundvierzig Millionen |

Verwendung

// CommonJS
const { numToWord } = require('num-words-de');
numToWord(1); // "Eins"

// ES Module / TypeScript
import { numToWord } from 'num-words-de';
numToWord(1); // "Eins"

Parameter

numToWord(number, params?) – Das zweite Argument ist ein optionales Objekt:

| Parameter | Typ | Standard | Beschreibung | | ------------------ | --------- | -------- | --------------------------------------------------------------- | | uppercase | boolean | true | Erster Buchstabe groß (true) oder alles klein (false) | | indefinite_eine | boolean | false | Zahl 1 wird zu eine (z. B. „eine Katze") | | indefinite_einer | boolean | false | Zahl 1 wird zu einer (z. B. „einer von vielen") | | indefinite_eines | boolean | false | Zahl 1 wird zu eines (z. B. „eines Tages") | | indefinite_einem | boolean | false | Zahl 1 wird zu einem (z. B. „mit einem Stück") | | indefinite_ein | boolean | false | Zahl 1 wird zu ein (z. B. „ein Haus") |

Die Indefinitformen wirken sich nur auf die Zahl 1 aus. Bei anderen Zahlen werden sie ignoriert.

numToWord(1);                                             // "Eins"
numToWord(10, { uppercase: false });                      // "zehn"
numToWord(1, { indefinite_eine: true });                  // "Eine"
numToWord(1, { indefinite_einer: true });                 // "Einer"
numToWord(1, { indefinite_eines: true });                 // "Eines"
numToWord(1, { indefinite_einem: true });                 // "Einem"
numToWord(1, { indefinite_ein: true });                   // "Ein"
numToWord(1, { indefinite_einem: true, uppercase: false }); // "einem"
numToWord(3, { indefinite_eine: true });                  // "Drei"

Fehlerbehandlung

  • Nicht-numerische Eingaben geben den Originalwert zurück und loggen console.error.
  • Zahlen > 12 Stellen geben den Originalwert zurück und loggen console.error.

Es werden keine Exceptions geworfen – die Eingabe wird bevorzugt angezeigt, statt die Anwendung abstürzen zu lassen.

Mitwirken

Fehler gefunden? Erstelle gerne ein Issue – bitte den Eingabewert angeben.


License / Lizenz

MIT © Chooklii