@connectv/core
Version:
agent-based reactive programming library for typescript/javascript
16 lines • 488 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
*
* 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`
*
*/
function isClearable(whatever) {
return !!(whatever.clear) && typeof whatever.clear === 'function';
}
exports.isClearable = isClearable;
//# sourceMappingURL=clearable.js.map