@saberhq/sail
Version:
Account caching and batched loading for React-based Solana applications.
20 lines • 479 B
JavaScript
/**
* Returns undefined if any argument is undefined, or null
* if argument is null.
*
* This is particularly useful for dealing with the results of
* multiple queries.
*
* @param args
* @returns
*/
export const noneProduct = (...args) => {
if (!args.every((arg) => arg !== undefined)) {
return undefined;
}
if (!args.every((arg) => arg !== null)) {
return null;
}
throw new Error("failed check");
};
//# sourceMappingURL=falsy.js.map