var-names

0.0.0 • Public • Published

var-names

Generate Variable Names

install

npm install var-names

usage

const { genVarNames } = require("var-names");

// create the generator
const gen = genVarNames();

// iterate over the variables
for (const varname of gen) {
  // varname is A, B, C, ... AA, AB, ... BB, BC, ... AAB
}

advanced usage

// create the generator
const gen = genVarNames({
  chars: ['A', 'B', 'C', ... 'a', 'b'], // character set to choose from, default to English alphabet in upper then lower case
  debug: false, // set to true for increased logging
  max_count: 1000000, // maximum number of iterations, defaults to 1 million
});

Package Sidebar

Install

npm i var-names

Weekly Downloads

1

Version

0.0.0

License

CC0-1.0

Unpacked Size

12.7 kB

Total Files

4

Last publish

Collaborators

  • danieljdufour