Changeset ff72ad2 for node_modules/axios/lib/utils.js
- Timestamp:
- 04/01/25 22:58:15 (2 months ago)
- Branches:
- master
- Children:
- 8ae59d6
- Parents:
- 3a74959
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
node_modules/axios/lib/utils.js
r3a74959 rff72ad2 601 601 const toFiniteNumber = (value, defaultValue) => { 602 602 return value != null && Number.isFinite(value = +value) ? value : defaultValue; 603 }604 605 const ALPHA = 'abcdefghijklmnopqrstuvwxyz'606 607 const DIGIT = '0123456789';608 609 const ALPHABET = {610 DIGIT,611 ALPHA,612 ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT613 }614 615 const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {616 let str = '';617 const {length} = alphabet;618 while (size--) {619 str += alphabet[Math.random() * length|0]620 }621 622 return str;623 603 } 624 604 … … 750 730 global: _global, 751 731 isContextDefined, 752 ALPHABET,753 generateString,754 732 isSpecCompliantForm, 755 733 toJSONObject,
Note:
See TracChangeset
for help on using the changeset viewer.