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

nardus

v1.0.2

Published

Nardus - A module providing chipher functionality

Readme

Nardus - A module for encrypting strings using classic ciphers

This is a simple module used to encrypt strings using three classic ciphers, the Caesar cipher, the Alberti cipher and the Vigenere cipher.

Current features

  • Use your own custom alphabet.
  • Encrypt and decrypt strings using the Caesar cipher.
  • Encrypt and decrypt strings using the Alberti cipher.
  • Encrypt and decrypt strings using the Vigenere cipher.

Setup

Install the module using the command below.

Git clone

npm i nardus

Import to project

import { Alphabet, AlbertiCipher, CaesarCipher, VigenereCipher } from './ciphers.js'

Basic Usage Example

import { Alphabet, AlbertiCipher, CaesarCipher, VigenereCipher } from './ciphers.js'

// Create an alphabet to use in your ciphering business.
const swedishAlphabet = new Alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ')
const englishAlphabet = new Alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

// Create an instance of your desired cipher.

// If you wish to encrypt text using a Caesar Cipher you pass along two
// arguments. The first argument is the key you wish to use. This argument
// must be an integer. The second argument is the alphabet object you wish
// to use.
const caesarCipher = new CaesarCipher(3, swedishAlphabet)

// If you wish to encrypt text using a Alberti Cipher you pass along three
// arguments. The first argument is the first key you wish to use. The second
// argument is the second key you wish to use. The first two arguments must
// be integers. The third argument is the alphabet object you wish to use.
const albertiCipher = new AlbertiCipher(3, 7, englishAlphabet)

// If you wish to encrypt text using a Vigenere Cipher you pass along two
// arguments. The first argument is the key you wish to use. This argument
// must be string of letters. The second argument is the alphabet object
// you wish to use.
const vigenereCipher = new VigenereCipher('vitlök', swedishAlphabet)

// To encrypt a string you simply pass a string to the encrypt method in
// the cipher object. The method will return an encrypted string. To decrypt
// the sting you pass the encrypted string to the decrypt method in the same
// cipher object.

// Returns: 'ijy nsqjifsij yjxyjy'
caesarCipher.encrypt('det inledande testet')

// Returns: 'det inledande testet'
caesarCipher.decrypt('ijy nsqjifsij yjxyjy')

// The same goes for the other two ciphers.

Testing

Testing of the module functionalities has been done and you can find the test report here

Dependencies

This module has no dependencies.

Code Quality

The code quality of this module has been evaluated and you can find the evaluation here

License

This module is released under the MIT License.