MCPcopy Index your code
hub / github.com/nodejs/node / equalJwk

Function equalJwk

test/fixtures/wpt/WebCryptoAPI/util/helpers.js:367–382  ·  view source on GitHub ↗
(expected, got)

Source from the content-addressed store, hash-verified

365// matching values for each property that was expected? It's okay if the
366// returned object has extra methods; they aren't checked.
367function equalJwk(expected, got) {
368 var fields = Object.keys(expected);
369 var fieldName;
370
371 for(var i=0; i<fields.length; i++) {
372 fieldName = fields[i];
373 if (!(fieldName in got)) {
374 return false;
375 }
376 if (objectToString(expected[fieldName]) !== objectToString(got[fieldName])) {
377 return false;
378 }
379 }
380
381 return true;
382}
383
384// Jwk format wants Base 64 without the typical padding at the end.
385function byteArrayToUnpaddedBase64(byteArray){

Callers 8

testFormatFunction · 0.85
testFormatFunction · 0.85
testFormatFunction · 0.85
testJwkAlgBehavioursFunction · 0.85
testFormatFunction · 0.85
testFormatFunction · 0.85
testFormatFunction · 0.85
equalExportFunction · 0.85

Calls 2

objectToStringFunction · 0.85
keysMethod · 0.65

Tested by

no test coverage detected