1.0.0 ā€¢ Published 9 months ago

@logmedaily/aekatva v1.0.0

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

custom utilities such generating uuid{v1,v2,v3,v4,v5}, unique random number, unique random string, unique alpha numeric for some specific needs

šŸ  Homepage

Prerequisites

  • node >=18.16.0
  • npm >=9.5.1

Install

npm install @logmedaily/aekatva

Usage

Generate UUIDs (v1, v2, v3, v4, v5)

UUID v1

const aekatva = require('@logmedaily/aekatva');



const aekatva = require('@logmedaily/aekatva');
const uuid_v1 = aekatva.uuid_v1();
console.log(uuid_v1); // Output will be a valid UUID v1

UUID v2

const domain = 0xa;
const identifier = 1;
const uuid_v2 = aekatva.uuid_v2(domain, identifier);
console.log(uuid_v2); // Output will be a valid UUID v2

UUID v3

const name = 'example.com';
const namespace = aekatva.uuid_v1(); // or another UUID
const uuid_v3 = aekatva.uuid_v3(name, namespace);
console.log(uuid_v3); // Output will be a valid UUID v3

UUID v4

const uuid_v4 = aekatva.uuid_v4();
console.log(uuid_v4); // Output will be a valid UUID v4

UUID v5

const name = 'example.com';
const namespace = aekatva.uuid_v1(); // or another UUID
const uuid_v5 = aekatva.uuid_v5(name, namespace);
console.log(uuid_v5); // Output will be a valid UUID v5

Generate Unique Random Numbers (one time codes)

const length = 10;
const randomNumericCode = aekatva.random_code_numeric(length);
console.log(randomNumericCode); // Output will be a unique numeric code of the given length

Generate Unique Random Strings (One time code)

const length = 10;
const randomStringCode = aekatva.random_code_strings(length);
console.log(randomStringCode); // Output will be a unique string of letters of the given length

Generate Unique Alphanumeric Codes

const length = 10;
const randomAlphanumericCode = aekatva.random_code_alphanumeric(length);
console.log(randomAlphanumericCode); // Output will be a unique alphanumeric code of the given length

Run tests

npm run test

Author

šŸ‘¤ logmedaily

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!


This README was generated with ā¤ļø by readme-md-generator