@foxtware/mineral 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/utils.js +5 -0
- package/package.json +1 -1
package/api/utils.js
CHANGED
|
@@ -1448,6 +1448,10 @@ const objectPropsTranslate = (
|
|
|
1448
1448
|
return translatedObj;
|
|
1449
1449
|
};
|
|
1450
1450
|
|
|
1451
|
+
const randomArrayItem = (array) => {
|
|
1452
|
+
return array[Math.floor(Math.random() * array.length)];
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1451
1455
|
module.exports = {
|
|
1452
1456
|
wait,
|
|
1453
1457
|
timeMs,
|
|
@@ -1491,4 +1495,5 @@ module.exports = {
|
|
|
1491
1495
|
surveyObject,
|
|
1492
1496
|
diffObjects,
|
|
1493
1497
|
objectPropsTranslate,
|
|
1498
|
+
randomArrayItem,
|
|
1494
1499
|
};
|