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

Method equals

lib/internal/crypto/keys.js:205–216  ·  view source on GitHub ↗
(otherKeyObject)

Source from the content-addressed store, hash-verified

203 }
204
205 equals(otherKeyObject) {
206 if (!isKeyObject(otherKeyObject)) {
207 throw new ERR_INVALID_ARG_TYPE(
208 'otherKeyObject', 'KeyObject', otherKeyObject);
209 }
210
211 const slots = getKeyObjectSlots(this);
212 const otherSlots = getKeyObjectSlots(otherKeyObject);
213 return slots[kKeyObjectSlotType] === otherSlots[kKeyObjectSlotType] &&
214 slots[kKeyObjectSlotHandle].equals(
215 otherSlots[kKeyObjectSlotHandle]);
216 }
217
218 static {
219 getKeyObjectSlots = (key) => {

Calls 1

isKeyObjectFunction · 0.85

Tested by

no test coverage detected