@codedipper/random-code
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

random-code

About

Generates a random code/id.
One simple function and zero dependencies.
Node.js v0.10.0 required for CJS.

Browser

Simply copy and paste the following tag into your HTML:
<script src="https://rc.revvy.de/3.1.0/browser.min.js"></script>
Then use the gen() function as normal.

Example

const gen = require("@codedipper/random-code");
// import gen from "@codedipper/random-code";

console.log(gen()); // Will generate ten character code.
console.log(gen(4)); // Will generate four character code.
console.log(gen(4, "0123456789"));
// ^ Will generate four character code with those specific characters.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.0
    7
    • latest

Version History

Package Sidebar

Install

npm i @codedipper/random-code

Weekly Downloads

44

Version

3.1.0

License

MIT

Unpacked Size

2.78 kB

Total Files

6

Last publish

Collaborators

  • codedipper