mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-03 12:53:35 +08:00
11 lines
333 B
JavaScript
11 lines
333 B
JavaScript
// type utils
|
|
|
|
// all args not null and not undefined
|
|
export const areDefined = (...vals) => vals.every(isDefined);
|
|
|
|
// not null and not undefined
|
|
export const isDefined = (val) => val !== undefined && val !== null;
|
|
|
|
// defined, number and finite
|
|
export const isValidNumber = (val) => isDefined(val) && !isNaN(val) && isFinite(val);
|