MCPcopy Index your code
hub / github.com/strongloop/loopback / matches

Function matches

common/models/role.js:201–208  ·  view source on GitHub ↗
(id1, id2)

Source from the content-addressed store, hash-verified

199 * @returns {boolean}
200 */
201 function matches(id1, id2) {
202 if (id1 === undefined || id1 === null || id1 === '' ||
203 id2 === undefined || id2 === null || id2 === '') {
204 return false;
205 }
206 // The id can be a MongoDB ObjectID
207 return id1 === id2 || id1.toString() === id2.toString();
208 }
209
210 /**
211 * Check if a given user ID is the owner the model instance.

Callers 4

role.jsFile · 0.85
legacyOwnershipCheckFunction · 0.85
processRelatedUserFunction · 0.85
processRelationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…