Functionis Framework
The Functionis framework is a lightweight JavaScript library designed to simplify and enhance web development by providing a set of convenient functions for common tasks.
Include the functionis.js script in your HTML:
<script src="./node_modules/functionis/functionist.js"></script>
1. Random Element Selection: Features
const myArray = [1, 2, 3, 4, 5]; const randomElement = functionis.getRandomElement(myArray); console.log('Random Element:', randomElement);
2. Delayed and Repeated Code Execution:
functionis.play(1000, 5, function() { console.log('Executing callback with delay and repetition'); });
3. Styled Authentication Input Fields:
functionis.auth('auth-input');
4. Comments:
<comment type="error">This is an error comment</comment> <comment type="warning">This is a warning comment</comment> <comment type="info">This is an info comment</comment> <comment>This is a undefined comment</comment>
5. Variable Value Display:
<display get="myVariable">
6. Double-Click and Triple-Click Handling:
functionis.onDoubleClick(document.getElementById('doubleClickExample'), function() { console.log('Double-clicked!'); });
functionis.onTripleClick(document.getElementById('tripleClickExample'), function() { console.log('Triple-clicked!'); });
- Math Expression Evaluation:
<math>1 + 5</math> <math>5 * 10</math> <math>20 + (23 + 1)</math>
- calculateTime:
const timeDifference = functionis.calculateTime('11-35-10'); console.log(`Time difference: ${timeDifference.hours} hours, ${timeDifference.minutes} minutes, ${timeDifference.seconds} seconds`);