@salesforce/lds-utils-adapters 1.247.0 → 1.249.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/dist/ldsAdapterUtils.js +16 -1
- package/dist/types/main.d.ts +1 -0
- package/dist/types/uuid.d.ts +4 -0
- package/package.json +1 -1
package/dist/ldsAdapterUtils.js
CHANGED
|
@@ -389,4 +389,19 @@ class AsyncWorkerPool {
|
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
/**
|
|
393
|
+
Use Math.random to generate v4 RFC4122 compliant uuid
|
|
394
|
+
*/
|
|
395
|
+
function uuidv4() {
|
|
396
|
+
const uuid = [];
|
|
397
|
+
for (let i = 0; i < 32; i++) {
|
|
398
|
+
const random = (Math.random() * 16) | 0;
|
|
399
|
+
if (i === 8 || i === 12 || i === 16 || i === 20) {
|
|
400
|
+
uuid.push('-');
|
|
401
|
+
}
|
|
402
|
+
uuid.push((i === 12 ? 4 : i === 16 ? (random & 3) | 8 : random).toString(16));
|
|
403
|
+
}
|
|
404
|
+
return uuid.join('');
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export { AsyncWorkerPool, LdsAbortController, runAdapterWithReport, uuidv4 };
|
package/dist/types/main.d.ts
CHANGED