Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isIncrementHelper(payload) {
// return payload instanceof Increment
return (isWhat.isAnyObject(payload) &&
!isWhat.isPlainObject(payload) &&
// @ts-ignore
payload.isIncrementHelper === true);
}
function convertTimestamps(originVal, targetVal) {
if (originVal === '%convertTimestamp%') {
// firestore timestamps
// @ts-ignore
if (isWhat.isAnyObject(targetVal) && !isWhat.isPlainObject(targetVal) && isWhat.isFunction(targetVal.toDate)) {
// @ts-ignore
return targetVal.toDate();
}
// strings
if (isWhat.isString(targetVal) && isWhat.isDate(new Date(targetVal))) {
return new Date(targetVal);
}
}
return targetVal;
}
/**
function isArrayHelper(value) {
// this is bugged in vuex actions, I DONT KNOW WHY
// return (
// value instanceof ArrayUnion ||
// value instanceof ArrayRemove
// )
return (isWhat.isAnyObject(value) &&
!isWhat.isPlainObject(value) &&
// @ts-ignore
value.isArrayHelper === true);
}
function convertTimestamps(originVal, targetVal) {
if (originVal === '%convertTimestamp%') {
// firestore timestamps
// @ts-ignore
if (isWhat.isAnyObject(targetVal) && !isWhat.isObject(targetVal) && isWhat.isFunction(targetVal.toDate)) {
// @ts-ignore
return targetVal.toDate();
}
// strings
if (isWhat.isString(targetVal) && isWhat.isDate(new Date(targetVal))) {
return new Date(targetVal);
}
}
return targetVal;
}
/**
function isIncrementHelper(payload) {
// return payload instanceof Increment
return (isAnyObject(payload) &&
!isPlainObject(payload) &&
// @ts-ignore
payload.isIncrementHelper === true);
}
function convertTimestamps(originVal, targetVal) {
if (originVal === '%convertTimestamp%') {
// firestore timestamps
// @ts-ignore
if (isWhat.isAnyObject(targetVal) && !isWhat.isPlainObject(targetVal) && isWhat.isFunction(targetVal.toDate)) {
// @ts-ignore
return targetVal.toDate();
}
// strings
if (isWhat.isString(targetVal) && isWhat.isDate(new Date(targetVal))) {
return new Date(targetVal);
}
}
return targetVal;
}
/**
return params.map(function (param) {
if (isAnyObject(param) && !isPlainObject(param)) {
// @ts-ignore
return String(param.constructor.name) + String(param.id);
}
return String(param);
}).join();
}
return params.map(param => {
if (isAnyObject(param) && !isPlainObject(param)) {
// @ts-ignore
return String(param.constructor.name) + String(param.id)
}
return String(param)
}).join()
}
function isIncrementHelper(payload) {
// return payload instanceof Increment
return (isWhat.isAnyObject(payload) &&
!isWhat.isPlainObject(payload) &&
// @ts-ignore
payload.isIncrementHelper === true);
}
function isArrayHelper(value) {
// this is bugged in vuex actions, I DONT KNOW WHY
// return (
// value instanceof ArrayUnion ||
// value instanceof ArrayRemove
// )
return (isAnyObject(value) &&
!isPlainObject(value) &&
// @ts-ignore
value.isArrayHelper === true);
}