0.0.37 • Published 5 months ago

genius.js v0.0.37

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

💻 › GeniusJS

❤ › A module made in with functions to help your Programming.

📦 › Installation:

- npm install genius.js
- yarn add genius.js
- pnpm add genius.js

🧰 › Functions:

  • - converterTemperature
  • - escapeRegex
  • - formatDate
  • - formatSizeUnits
  • - generatePassword
  • - getCurrentDate
  • - isInteger
  • - makeCharTable
  • - msToTime
  • - randomHex
  • - randomNumber
  • - randomText
  • - removeDuplicatesArr
  • - removeEmojis
  • - shorten
  • - abbreviate
  • - unabbreviate
  • - timeToMs
  • - toMorseCode

⭐ › Examples of Functions:

import genius from 'genius.js'; 
// Or
const genius = require('genius.js');

(async() => {

  const EscapeRegex = genius.escapeRegex('Hello $');
  console.log(EscapeRegex); // [ 'Hello \\$' ]

  const FormatDateShort = genius.formatDate(new Date(), 'short+h');
  console.log(FormatDateShort); // [ '14/04/2023 às 12:42' ]

  const FormatDateLong = genius.formatDate(new Date(), 'long+h', '+');
  console.log(FormatDateLong); // [ '14 de Abril de 2023 às 12:43' ]

  const formatSizeUnits = genius.formatSizeUnits(1000000000);
  console.log(formatSizeUnits); // [ '1.00 GB' ]

  const msToTime = genius.msToTime(10000);
  console.log(msToTime); // [ '10s' ]

  const randomHex = genius.randomHex();
  console.log(randomHex); // [ '#1d0cb9' or '#c7682f' or '#642fdb' or ... ]

  const randomNumber = genius.randomNumber(1, 10);
  console.log(randomNumber); // [ '5' or '9' or '8' or ... ]

  const randomText = genius.randomText(['owo', 'hello', 'hi']);
  console.log(randomText); // [ 'hello' or 'owo' or 'hi' or ... ]
  
  const shorten = genius.shorten('Genius NPM, the best', 10);
  console.log(shorten); // [ 'Genius NPM..' ]
  
  const abbreviate = genius.abbreviate(10000);
  console.log(abbreviate); // [ '10k' ]

  const unabbreviate = genius.unabbreviate('10k');
  console.log(unabbreviate); // [ '10000' ]

  const timeToMs = genius.timeToMs('2h');
  console.log(timeToMs); // [ 7200000 ]

  const makeCharTable = genius.makeCharTable('3x2', '😁', '🤖');
  console.log(makeCharTable); // [ '😁😁😁\n🤖🤖🤖' ]

  const getCurrentDate = genius.getCurrentDate('2h');
  console.log(getCurrentDate); // [ '30/4/2023 13:30:26' ]

  const converterTemperature = genius.converterTemperature(32, 'C', 'F');
  console.log(converterTemperature); // [ 89.6 ]

  const removeEmojis = genius.removeEmojis('Hi 😁🤖');
  console.log(removeEmojis); // [ 'Hi' ]

  const isInteger1 = genius.isInteger(10);
  console.log(isInteger1); // [ true ]

  const isInteger2 = genius.isInteger(9.9);
  console.log(isInteger2); // [ false ]

  const removeDuplicatesArr = genius.removeDuplicatesArr(['Hi', 'Hi', 'Owo']);
  console.log(removeDuplicatesArr); // [ [ 'Hi', 'Owo' ] ]

  const toMorseCode = genius.toMorseCode('Hi');
  console.log(toMorseCode); // [ '.... ..' ]

  const generatePassword = genius.generatePassword(10, true, true, true, true);
  console.log(generatePassword); // [ '7gKq3@i85p' ]

})();
0.0.37

5 months ago

0.0.36

5 months ago

0.0.35

9 months ago

0.0.34

1 year ago

0.0.33

1 year ago

0.0.32

1 year ago

0.0.31

1 year ago

0.0.30

1 year ago

0.0.29

1 year ago

0.0.28

1 year ago

0.0.27

1 year ago

0.0.26

1 year ago

0.0.25

1 year ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago