UNPKG

363 BJavaScriptView Raw
1'use strict';
2
3module.exports = handleTimestampOption;
4
5/*!
6 * ignore
7 */
8
9function handleTimestampOption(arg, prop) {
10 if (arg == null) {
11 return null;
12 }
13
14 if (typeof arg === 'boolean') {
15 return prop;
16 }
17 if (typeof arg[prop] === 'boolean') {
18 return arg[prop] ? prop : null;
19 }
20 if (!(prop in arg)) {
21 return prop;
22 }
23 return arg[prop];
24}
\No newline at end of file