v0.3.0 - Profiles (Check the description for changes)

A lot has been renovated and some small things has been added to v0.3.0:
	* Added profiles (`getProfile`, `setProfile`, `setDefaults`)
	* Renamed `Collection` to `MemoryCollection`
	* Made `wumpfetch.userAgent` read-only
	* Renamed `__test__` to `tests`
	* Removed the `dist` folder
	* Changed the tab size from `4` to `2` in the declarations file
	and wumpfetch TS test file
	* Added JSdoc to `WumpRequest` and `WumpResponse`
	* Fixed up some of the weird spacing in `WumpRequest` and
	`WumpResponse`
	* Cleaned up all test files
This commit is contained in:
Wessel T
2019-08-26 16:52:34 +02:00
parent fc74329800
commit dd302b983e
31 changed files with 965 additions and 864 deletions

3
examples/utils/index.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
string: require('./string')
};

10
examples/utils/string.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = (iterations = 1, seed = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') => {
let text = '';
if (typeof seed !== 'string' || seed.length <= 0 || typeof iterations !== 'number') return text;
for (let i = 0; i < iterations; i++) {
text += seed.charAt(Math.floor(Math.random() * seed.length));
}
return text;
};