@lodestar/utils
Version:
Utilities required across multiple lodestar packages
12 lines • 339 B
JavaScript
/**
* Type-safe helper to filter out nullist values from an array
* ```js
* const array: (string | null)[] = ['foo', null];
* const filteredArray: string[] = array.filter(notEmpty);
* ```
* @param value
*/
export function notNullish(value) {
return value !== null && value !== undefined;
}
//# sourceMappingURL=notNullish.js.map