1.0.3 • Published 6 months ago

random-base-string v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@ksr/random-base-string

A utility function that generates a random string in a given numeric base (e.g., hexadecimal, binary) with customizable length.

Installation

You can install it via JSR:

npm i random-base-string

Usage Example

import { randomBaseString as _rBs } from '@ksr/random-base-string';

// Generate a random hex string with length 8
const hexString = _rBs(16, 8);
console.log(hexString);

// Generate a random binary string with length 12
const binaryString = _rBs(2, 12);
console.log(binaryString);
1.0.3

6 months ago

1.0.1

6 months ago