We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3969a1 commit e4eda2cCopy full SHA for e4eda2c
1 file changed
lib/internal/crypto/util.js
@@ -3,6 +3,7 @@
3
const {
4
ArrayBufferIsView,
5
ArrayBufferPrototypeGetByteLength,
6
+ ArrayFrom,
7
ArrayPrototypeIncludes,
8
ArrayPrototypePush,
9
BigInt,
@@ -743,6 +744,9 @@ const kCanonicalUsageOrder = new SafeSet([
743
744
* @returns {string[]}
745
*/
746
function getSortedUsages(usageSet) {
747
+ if (usageSet.size <= 1) {
748
+ return ArrayFrom(usageSet)
749
+ }
750
const result = [];
751
for (const usage of kCanonicalUsageOrder) {
752
if (usageSet.has(usage))
0 commit comments