@zeix/ui-element
Version:
UIElement - minimal reactive framework based on Web Components
10 lines (7 loc) • 400 B
text/typescript
const isFunction = /*#__PURE__*/ <T>(value: unknown): value is (...args: unknown[]) => T =>
typeof value === 'function'
const isDefinedObject = /*#__PURE__*/ (value: unknown): value is Record<string, unknown> =>
!!value && typeof value === 'object'
const isString = /*#__PURE__*/ (value: unknown): value is string =>
typeof value === 'string'
export { isFunction, isDefinedObject, isString }