@anteros/core 0.0.5 → 0.0.6
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/package.json +1 -1
- package/utils/func.ts +2 -0
package/package.json
CHANGED
package/utils/func.ts
CHANGED
|
@@ -465,6 +465,8 @@ async function generateRandom(options: GenerateRandomOptions, ctx: {
|
|
|
465
465
|
result += charset[randomIndex];
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
+
// startWith/endWith sont ajoutés autour du random (length ne contrôle que la partie aléatoire)
|
|
469
|
+
// Si c'est une fonction, elle reçoit la valeur aléatoire pour la personnaliser
|
|
468
470
|
const start = typeof startWith === 'function' ? startWith(result) : startWith;
|
|
469
471
|
const end = typeof endWith === 'function' ? endWith(result) : endWith;
|
|
470
472
|
result = start + result + end;
|