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

criptador4js

v2.0.0

Published

Encrypt JS files or code.

Readme

criptador4js

Encrypt JS files or code.

Installation

$ npm i -s criptador4js

What is it for?

What criptador4js does is to transform valid JS code to valid and encrypted JS code.

How it works

The tool accepts a JS file, that can be run on node or browser, and transforms this file into another JS file that does exactly that same that the previous one did, with one difference: the JS source code is in a string, and encrypted, and on runtime, the user is asked for the password for this code to be decrypted correctly.

If the user enters the correct password, the source code is correctly decrypted. Othewise, it won't be possible to run any JS, because the eval function will try to run invalid JS code, as it was not decrypted correctly through the correct password.

Usage

CLI

The command-line interface is only for files:

$ criptador4js
   # Required:
    --message "Question?"
    --password "Answer"
    --file file1.js
    --file file2.js
    --file file3.js
   # Optional:
    --verbose # prints every file path
    --override # replaces the file directly
    --export MyApi # globalizes the module

API

The API, instead, can encrypt JS code from files:

Criptador4js.encryptFile("./index.js");
Criptador4js.encryptFile(
  // Required:
  "./index.js",
  // Optional:
  "answer",
  "Question?",
  "MySuperIndex",
  "index.crypt.js",
  !!"shouldOverride"
); // creates: index.crypt.js
//
// Signature:
//    file,
//    password,
//    message,
//    globalId = false,
//    outputFile = undefined,
//    shouldOverride = false
//

...but also from strings (in browser):

const encryptedCode = Criptador4js.encryptCode(
  // Required:
  "alert('You successfully decrypted the code'); 'The last value is returned by eval';",
  // Optional:
  "answer",
  "Question?",
  "GlobalId",
); // returns: evaluable async JS code
const response = eval(encryptedCode);
const output = await response; // evaluation always returns a Promise...
const everythingWentFine = output === 'The last value is returned by eval'; // true

Why

Because more than 160 projects, and you do not give me a job... you are insane.

Usage with Git

By default, and without using the --override flag, criptador4js will generate a *.crypt.js file from our *.js source file.

So, to commit only crypted files, add on .gitignore file, these lines:

*.js
!*.crypt.js

This way, your commits will only register crypted JS files.

Alternatively, you can use the flag --override to directly replace the original files by the new, encrypted and executable file.

Trascendence

Go fuck yourself. Fucking rats.

License

No license, do what you want. The rat is not me here.