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

crambleturbo

v1.0.0

Published

CrambleTurbo: A fun text scrambling library. NOT for security-critical applications.

Readme

::: container

CrambleTurbo Documentation

Welcome to the documentation for CrambleTurbo, a versatile text scrambling tool designed for creative transformations and fun text animations. Whether you want to jumble up a word or animate text transitions on your web pages, CrambleTurbo provides a variety of methods to suit your needs.

::: disclaimer

Disclaimer

CrambleTurbo is an experimental tool intended for creative and non-critical applications. DO NOT use this for any critical security options or sensitive text transformations. Its algorithms are not designed for secure encryption or data protection. :::

How to Use

To integrate CrambleTurbo into your project, follow these steps based on your environment:

1. Install via npm

For Node.js projects or environments that support npm:

npm install crambleturbo
        

2. Import CrambleTurbo into Your Project

After installation, you can import the module into your JavaScript files.

For CommonJS (Node.js):

const CrambleTurbo = require('crambleturbo');

const ct = new CrambleTurbo({ mode: 'full', duration: 2000 });
const scrambled = ct.scrambleText("Hello World");
console.log("Scrambled Text:", scrambled);
        

For ES Modules:

import CrambleTurbo from 'crambleturbo';

const ct = new CrambleTurbo({ mode: 'preserveFirstLast', duration: 3000 });
const scrambled = ct.scrambleText("Hello World");
console.log("Scrambled Text:", scrambled);
        

Using CrambleTurbo in Browser with Module Bundlers

If you're using bundlers like Webpack or Parcel, import CrambleTurbo as follows:

// Import CrambleTurbo
import CrambleTurbo from 'crambleturbo';

// Create an instance and scramble text
const ct = new CrambleTurbo({ mode: 'rotate', duration: 2500 });
const scrambled = ct.scrambleText("Hello World");
console.log("Scrambled Text:", scrambled);
        

API Overview

The CrambleTurbo class provides several methods to transform and animate text:

  • Constructor(options)
    Options:
    • mode: 'full' | 'preserveFirstLast' | 'rotate' | 'randomCase' (default: 'full')
    • duration: Animation duration in milliseconds (default: 2000)
  • scrambleText(text)
    Scrambles an entire string by splitting it into words and processing each word based on the chosen mode.
  • scrambleWord(word, mode)
    Scrambles a single word according to the specified mode.
  • animateScramble(element, newText, callback)
    Animates the transition from random characters to the final scrambled text on a DOM element.
  • tickle()
    A fun method that logs a silly, ticklish message (not intended for production use).

Example Code

Below are some examples demonstrating how to use CrambleTurbo:

1. Basic Text Scrambling

const CrambleTurbo = require('crambleturbo');

const ct = new CrambleTurbo({ mode: 'full' });
const originalText = "Hello World";
const scrambled = ct.scrambleText(originalText);
console.log("Original:", originalText);
console.log("Scrambled:", scrambled);
        

2. Preserving the First and Last Characters

const ct = new CrambleTurbo({ mode: 'preserveFirstLast' });
console.log(ct.scrambleText("Example")); // E.g., "Examlpe"
        

3. Animated Scramble in the Browser

<!-- Include your bundled script or CrambleTurbo via a module bundler -->
<div id="demo">Hello World</div>

<script>
  const demoEl = document.getElementById("demo");
  const ct = new CrambleTurbo({ mode: 'randomCase', duration: 3000 });
  const scrambledText = ct.scrambleText(demoEl.textContent);
  ct.animateScramble(demoEl, scrambledText, () => {
      console.log("Animation complete!");
  });
</script>
        

Frequently Encountered Issues

Here are some common issues you might face when using CrambleTurbo:

  • Issue: "CrambleTurbo is not defined."
    Solution: Ensure that you have installed the module via npm and imported it correctly.
  • Issue: "Unexpected output from scrambleText."
    Solution: Verify that the mode option is set correctly. Options include 'full', 'preserveFirstLast', 'rotate', and 'randomCase'.

Additional Information

The CrambleTurbo module is built primarily for fun text transformations and creative animations. It is not designed for cryptographic or security-critical applications. Use it responsibly and avoid deploying it in environments that require secure text processing.

More Resources

For further details and advanced usage examples, explore additional documentation or check out our API overview.

API Overview » :::