Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isDefiningProjection.js 435B

123456789101112131415161718
  1. 'use strict';
  2. /*!
  3. * ignore
  4. */
  5. module.exports = function isDefiningProjection(val) {
  6. if (val == null) {
  7. // `undefined` or `null` become exclusive projections
  8. return true;
  9. }
  10. if (typeof val === 'object') {
  11. // Only cases where a value does **not** define whether the whole projection
  12. // is inclusive or exclusive are `$meta` and `$slice`.
  13. return !('$meta' in val) && !('$slice' in val);
  14. }
  15. return true;
  16. };