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.

handleTimestampOption.js 363B

123456789101112131415161718192021222324
  1. 'use strict';
  2. module.exports = handleTimestampOption;
  3. /*!
  4. * ignore
  5. */
  6. function handleTimestampOption(arg, prop) {
  7. if (arg == null) {
  8. return null;
  9. }
  10. if (typeof arg === 'boolean') {
  11. return prop;
  12. }
  13. if (typeof arg[prop] === 'boolean') {
  14. return arg[prop] ? prop : null;
  15. }
  16. if (!(prop in arg)) {
  17. return prop;
  18. }
  19. return arg[prop];
  20. }