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 🙏

© 2025 – Pkg Stats / Ryan Hefner

morse-me

v1.0.0

Published

CLI Node.js/TypeScript pour convertir des fichiers texte en code Morse.

Readme

morse_me

CLI Node.js/TypeScript pour convertir des fichiers texte en code Morse.

🚀 Aperçu

  • Interface de ligne de commande basée sur yargs (morse_it).
  • Conversion caractère par caractère grâce à la table complète définie dans library.ts.
  • Signalement des caractères non pris en charge pour faciliter le nettoyage des données.

📦 Prérequis

  • Node.js ≥ 20
  • npm ≥ 10

Vérifie tes versions :

node --version
npm --version

🔧 Installation

git clone <repo-url>
cd morse_me
npm install

🛠️ Scripts npm

| Script | Description | |--------|-------------| | npm run build | Compile TypeScript vers dist/ via tsc. | | npm start | Exécute la version compilée (node dist/index.js). | | npm test | Placeholder qui affiche un message (à remplacer par ta suite de tests). | | npm run prepublishOnly | Compile automatiquement avant une publication npm. |

🔁 Utilisation du CLI

  1. Compile d’abord :
    npm run build
  2. Exemple de traduction d’un fichier :
    node dist/index.js encode README.md
    Le résultat affiche un bloc par fichier et indique les caractères ignorés (Skipped characters).

Alias binaire morse_it

  • Installation locale : npm link
  • Utilisation :
    morse_it encode chemin/vers/fichier.txt

Remarques

  • Les caractères non présents dans library.ts sont signalés mais ignorés dans la sortie.
  • Pour un format pur texte, la table Morse emploie déjà . et -.

🧪 Tests

npm test renvoie pour l’instant « No automated tests defined yet ». Remplace la commande par Jest, Vitest ou tout autre framework lorsque tu ajoutes des tests.

🐳 Dev Container

Fichier : .devcontainer/devcontainer.json

  1. Ouvre le dossier dans VS Code.
  2. Menu Command Palette → « Dev Containers: Reopen in Container ».
  3. npm install est lancé automatiquement (Node 20, extensions ESLint/Prettier/TS incluses).

🔄 Intégration Continue

Le workflow .github/workflows/ci.yml effectue :

  1. npm ci
  2. npm run lint:fix (en mode tolérant)
  3. npm run build
  4. npm test
  5. Un smoke test du CLI

Adapter npm test pour refléter ta vraie suite avant de faire confiance aux pipelines.

📁 Structure rapide

| Chemin | Rôle | |--------|------| | index.ts | Point d’entrée du CLI et définition de la commande encode. | | read.files.ts | Lecture asynchrone des fichiers à encoder. | | translate.files.ts | Conversion du texte en séquences Morse et rapport des caractères ignorés. | | library.ts | Table Morse (pattern et timings). | | cli.mjs | Shim Node utilisé par le binaire publié morse_it. |

📄 Licence

ISC