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

node-morgoth

v0.2.0

Published

From the depths of the forge, utilities for your Node.js project(s).

Readme

Node Morgoth

Still under development... Do not use it in production-grade project(s) until the version reaches 1.0.0

node-morgoth

Forge dark and powerful utilities for Node.js.
A mythic toolkit for Node.js craftsmen: file & folder manipulation, security helpers (JWT, bcrypt), and more — all forged in the depths of Morgoth’s forge.

✨ Why node-morgoth?

In Tolkien’s lore, Morgoth was the first dark lord, a master forger who shaped the very fabric of the world (and many of its darkest tools).
node-morgoth brings that same spirit of creation and control to your Node.js project(s):


📦 Install

Choose your preferred package manager:

npm i node-morgoth
pnpm add node-morgoth
yarn add node-morgoth

⚡ Features

  • ⚙️ Crafted for Node.js: Built with modern ESM and TypeScript.
  • 🌑 More Coming Soon: Like Morgoth’s endless forges.

🛠️ Usage Guides

File Conversion Utilities

fileToBase64

Convert a file on disk to a Base64 string (async):

import { fileToBase64 } from 'node-morgoth';

const base64 = await fileToBase64('path/to/file.png');
console.log(base64); // → Base64 string

fileToBase64Sync

Convert a file on disk to a Base64 string (sync):

import { fileToBase64Sync } from 'node-morgoth';

const base64 = fileToBase64Sync('path/to/file.png');
console.log(base64); // → Base64 string

createVirtualFileBase64

Create a Base64 string from given text content:

import { createVirtualFileBase64 } from 'node-morgoth';

const base64 = createVirtualFileBase64('Hello Morgoth!');
console.log(base64); // → Base64 string

base64ToFile

Recreate a browser File object from a Base64 string:

import { base64ToFile } from 'node-morgoth';

const file = base64ToFile(base64String, 'example.txt', 'text/plain');
console.log(file); // → File object (browser)

textToBase64

Convert plain text to Base64:

import { textToBase64 } from 'node-morgoth';

const base64 = textToBase64('Forge the dark tools');
console.log(base64); // → Base64 string

base64ToText

Decode Base64 back to plain text:

import { base64ToText } from 'node-morgoth';

const text = base64ToText(base64String);
console.log(text); // → original text

🔗 Related Packages


License

This project is licensed under the MIT License with the following additional requirement:

Additional Requirement:

Any fork, derivative work, or redistribution of this project must include clear attribution to Nazmul Hassan in both the source code and any publicly available documentation.

You are free to use, modify, and distribute this project under the terms of the MIT License, provided that appropriate credit is given.