All files / mongoose/lib/helpers/query trusted.js

42.85% Statements 3/7
0% Branches 0/4
0% Functions 0/1
42.85% Lines 3/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14    1x   1x   1x              
'use strict';
 
const trustedSymbol = Symbol('mongoose#trustedSymbol');
 
exports.trustedSymbol = trustedSymbol;
 
exports.trusted = function trusted(obj) {
  if (obj == null || typeof obj !== 'object') {
    return obj;
  }
  obj[trustedSymbol] = true;
  return obj;
};