@wdio/utils 8.1.2 → 8.2.0
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/build/utils.d.ts +2 -2
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +5 -5
- package/package.json +2 -2
package/build/utils.d.ts
CHANGED
|
@@ -58,8 +58,8 @@ export declare function isFunctionAsync(fn: Function): boolean;
|
|
|
58
58
|
export declare function filterSpecArgs(args: any[]): any[];
|
|
59
59
|
/**
|
|
60
60
|
* checks if provided string is Base64
|
|
61
|
-
* @param
|
|
62
|
-
* @return {
|
|
61
|
+
* @param {string} str string to check
|
|
62
|
+
* @return {boolean} `true` if the provided string is Base64
|
|
63
63
|
*/
|
|
64
64
|
export declare function isBase64(str: string): boolean;
|
|
65
65
|
/**
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,aAAa,CAAA;AAMpD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE;IAAE,sBAAsB,CAAC,EAAE;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,QAwCzH;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UA+BrE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAE,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;EAapF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAE,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,WA8B/D;AAED;;GAEG;AACH,wBAAgB,eA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AAE,EAAE,QAAQ,WAE5C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAE,IAAI,EAAE,GAAG,EAAE,SAE1C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,WAenC;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,UAAW,MAAM,YAWtC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,mCAAoD,CAAA"}
|
package/build/utils.js
CHANGED
|
@@ -227,22 +227,22 @@ export function filterSpecArgs(args) {
|
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* checks if provided string is Base64
|
|
230
|
-
* @param
|
|
231
|
-
* @return {
|
|
230
|
+
* @param {string} str string to check
|
|
231
|
+
* @return {boolean} `true` if the provided string is Base64
|
|
232
232
|
*/
|
|
233
233
|
export function isBase64(str) {
|
|
234
|
-
const notBase64 = new RegExp('[^A-Z0-9+\\/=]', 'i');
|
|
235
234
|
if (typeof str !== 'string') {
|
|
236
235
|
throw new Error('Expected string but received invalid type.');
|
|
237
236
|
}
|
|
238
237
|
const len = str.length;
|
|
238
|
+
const notBase64 = /[^A-Z0-9+/=]/i;
|
|
239
239
|
if (!len || len % 4 !== 0 || notBase64.test(str)) {
|
|
240
240
|
return false;
|
|
241
241
|
}
|
|
242
242
|
const firstPaddingChar = str.indexOf('=');
|
|
243
|
-
return firstPaddingChar === -1 ||
|
|
243
|
+
return (firstPaddingChar === -1 ||
|
|
244
244
|
firstPaddingChar === len - 1 ||
|
|
245
|
-
(firstPaddingChar === len - 2 && str[len - 1] === '=');
|
|
245
|
+
(firstPaddingChar === len - 2 && str[len - 1] === '='));
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* Helper utility to check file access
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "3620e90e47b6d3e62832f5de24f43cee6b31e972"
|
|
39
39
|
}
|