1.0.2 • Published 4 years ago
delta.functions v1.0.2
Hello
This is a simple package with some functions to help you.
Install delta.functions
$ npm install --save delta.functionsFeatures
- (🤩) Simple & easy to use
- ( ☁ ) Lightweight
- (🚄) Fast
Guide
| function | description | Args |
|---|---|---|
| replaceAll | Replaces all occurrences | String, Search, Replace |
| sleep | Waits a period of time to perform a function | Milliseconds |
| filter | filters an array, removing equal elements | Array |
| shuffle | Randomizes the elements of an array | Array |
| randomNumber | Receive a random number between the minimum and maximum values set | Min, Max |
| kiss | Random gif | |
| slap | Random gif | |
| hug | Random gif | |
| pat | Random gif | |
| tickle | Random gif |
Example of use
const DeltaFunctions = require('delta.functions');
const Client = new DeltaFunctions('pt-br'); // or "en" to English
Client.replaceAll('Hi Paul!', 'Paul', 'there'); // Hi there!
Client.sleep(10000); // { Promise }
Client.filter([1, 1, 2, 3, 3, 4, 5, 6, 6]); // [1, 2, 3, 4, 5, 6]
Client.shuffle([1, 2, 3, 4, 5, 6]); // [3, 6, 2, 1, 4, 5]
Client.randomNumber(1, 20); // 16
Client.kiss(); // { Promise }
Client.slap(); // { Promise }
Client.hug(); // { Promise }
Client.pat(); // { Promise }
Client.tickle(); // { Promise }