@genexus/web-standard-functions
Version:
GeneXus JavaScript standard functions library for web generators
25 lines • 747 B
JavaScript
import { setEmpty as dSetEmpty } from "../datetime/setEmpty";
import { setEmpty as sSetEmpty } from "../text/setEmpty";
import { setEmpty as nSetEmpty } from "../numeric/setEmpty";
import { setEmpty as bSetEmpty } from "../bool/setEmpty";
import { GxDatetime } from "../types/gxdatetime";
/**
* @param value
* @return any
*/
export const emptyValue = (value) => {
if (value instanceof GxDatetime) {
return dSetEmpty(value);
}
else if (typeof value === "string") {
return sSetEmpty(value);
}
else if (typeof value === "number") {
return nSetEmpty(value);
}
else if (typeof value === "boolean") {
return bSetEmpty(value);
}
return null;
};
//# sourceMappingURL=emptyValue.js.map