1.8.2 • Published 1 year ago

agere v1.8.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

بسم الله الرحمن الرحيم

agere

NPM version NPM downloads NPM package size

Install package

    npm install agere

CDN

    <script src="https://unpkg.com/agere@latest/index.js"></script>

utils

Randomize array elements

import { randArr } from "agere";

var myArr = ["Product 1","Product 2","Product 3"];
var newArr = randArr(myArr);

/* 
newArr = 
        ["Product 1","Product 2","Product 3"] ||
        ["Product 1","Product 3","Product 2"] ||
        ["Product 2","Product 1","Product 3"] ||
        ["Product 2","Product 3","Product 1"] ||
        ["Product 3","Product 2","Product 1"] ||
        ["Product 3","Product 1","Product 2"]
*/

randArr(); // [1,2,3,4,5,6,7,8,9,10] || [4,1,3,2,5,9,6,8,10,7] || 3628798 others   (10!)

Generate a password

import { gPass } from "agere";

var myPassword = 
        gPass(
                /* passLength ? default => */ 8,
                /* have lowercase ?  default => */ true,
                /* have uppercase ?  default => */ true,
                /* have numbers ?  default => */ true,
                /* symbols ?  default => */ "#!%$"   // if false type "" 
        );

More utils

import { randColor, pull, abbText, capitalize } from "agere";

// Get a random hexadecimal color
        var theColor = randColor();  // e.g #4700A5

// Pull element from an array
        var newArr = pull([1,2,3],2) // [1,3]

// Abbreviate a text
        var abbreviatedText = abbText("I love agere.",3) // "I l..."

// Capitalize a word
        var capitalizedWord = capitalize("egypt") // "Egypt"
1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.5.6

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago