lib/utils.js
function retrieveEJSON() {
  let EJSON = null;
  try {
    EJSON = requireOptional('mongodb-extjson');
  } catch (error) {} // eslint-disable-line
  if (!EJSON) {
    EJSON = {
      parse: noEJSONError,
      deserialize: noEJSONError,
      serialize: noEJSONError,
      stringify: noEJSONError,
      setBSONModule: noEJSONError,
      BSON: noEJSONError
    };
  }

  return EJSON;
}
function retrieveEJSON() {
  let EJSON = null;
  try {
    EJSON = requireOptional('mongodb-extjson');
  } catch (error) {} // eslint-disable-line
  if (!EJSON) {
    EJSON = {
      parse: noEJSONError,
      deserialize: noEJSONError,
      serialize: noEJSONError,
      stringify: noEJSONError,
      setBSONModule: noEJSONError,
      BSON: noEJSONError
    };
  }

  return EJSON;
}
function retrieveEJSON ( ) { let EJSON = null ; try { EJSON = requireOptional ( 'mongodb-extjson' ) ; } catch ( error ) { } // eslint-disable-line if ( ! EJSON ) { EJSON = { parse : noEJSONError , deserialize : noEJSONError , serialize : noEJSONError , stringify : noEJSONError , setBSONModule : noEJSONError , BSON : noEJSONError } ; } return EJSON ; }
Facilitate loading EJSON optionally
Facilitate loading EJSON optionally