This commit is contained in:
2026-04-02 17:50:10 +08:00
parent 60697d80be
commit ce0aa4f789
373 changed files with 82520 additions and 46 deletions

View File

@@ -0,0 +1,24 @@
'use strict';
module.exports = handleTimestampOption;
/*!
* ignore
*/
function handleTimestampOption(arg, prop) {
if (arg == null) {
return null;
}
if (typeof arg === 'boolean') {
return prop;
}
if (typeof arg[prop] === 'boolean') {
return arg[prop] ? prop : null;
}
if (!(prop in arg)) {
return prop;
}
return arg[prop];
}