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

string-enumerator

v1.0.0

Published

A package for enumerating strings based off of a set of characters. Great for blind brute forcing and fuzzing.

Readme

string-enumerator

0 dependencies

An NPM package for enumerating strings based off of a set of characters. Great for blind brute forcing and fuzzing.

Example

	var EnumString = require('string-enumerator')
	var charset = 'abcd123';
	var eString = new EnumString.EnumString(charset);

	for (var i = 0; i < 20; i++) {
		console.log(eString.nextString())
	}

	// Logs: a b c d 1 2 3 aa ab ac ad a1 a2 a3 ba bb bc bd b1 b2

API


EnumString.EnumString

EnumString.EnumString is the main constructor for the EnumString object, and must be instatiated to utilize this package. The constructor requires that a string or array of characters is passed as the first argument, which dictates the character set that the object will enumerate through.

Syntax:

	var charset = 'abcd123';
	var eString = new EnumString.EnumString(charset);

EnumString.prototype.setIndex

Sets the current index of enumeration to a specified number.

Syntax:

	eString.setIndex(2);

EnumString.prototype.getIndex

Returns the current enumeration index.

Syntax:

	eString.setIndex(4);
	console.log(eString.getIndex()); // Logs "4"

EnumString.prototype.getString

Gets the string identified by the current enumeration index.

Syntax:

	// Assuming the charset 'abcd123'
	eString.setIndex(0);
	console.log(eString.getString()); // Logs 'a'
	eString.setIndex(1);
	console.log(eString.getString()); // Logs 'b'
	eString.setIndex(7);
	console.log(eString.getString()); // Logs 'aa'

EnumString.prototype.nextString

Returns the string at index then increases index by one, for use in loops.

Syntax:

	// Assuming the charset 'abcd123'
	eString.setIndex(3);
	for (var i = 0; i < 3; i++) {
		console.log(eString.nextString());
	}
	// Logs: d 1 2

EnumString.prototype.prevString

Returns the string at index then decreases index by one, for use in loops.

Syntax:

	// Assuming the charset 'abcd123'
	eString.setIndex(8);
	for (var i = 0; i < 3; i++) {
		console.log(eString.prevString());
	}
	// Logs: ab aa 3

EnumString.prototype.getIndexFromStr

Gets the index that would correspond to the given string.

Syntax:

	// Assuming the charset 'abcd123';
	console.log(eString.getIndexFromStr('a')); // Logs: '0'
	console.log(eString.getIndexFromStr('2')); // Logs: '5'
	console.log(eString.getIndexFromStr('aa')); // Logs: '7'

EnumString.letters

A quality of life string containing upper and lowercase letters

Syntax:

	console.log(EnumString.letters); // Logs: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

EnumString.digits

A quality of life string containing numbers 0-9

Syntax:

	console.log(EnumString.digits); // Logs: '0123456789'

EnumString.symbols

A quality of life string containing some symbols

Syntax:

	console.log(EnumString.symbols); // Logs: '`~!@#$%^&*()-_=+[{]}|\\;:\'",<.>/?'