@connectv/core
Version:
agent-based reactive programming library for typescript/javascript
13 lines • 383 B
JavaScript
/**
*
* Checks if given object matches [Clearable](https://connective.dev/docs/interfaces#clearable) interface.
* Basically checks if `.clear()` method exists.
*
* @param whatever
* @return `true` if `any` is `Clerable`
*
*/
export function isClearable(whatever) {
return !!(whatever.clear) && typeof whatever.clear === 'function';
}
//# sourceMappingURL=clearable.js.map