How to use the @remirror/core-helpers.isObject function in @remirror/core-helpers

To help you get started, we’ve selected a few @remirror/core-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / ui / src / ui-hsl.ts View on Github external
export const isHSL = (value: unknown): value is HSL =>
  isObject(value) && value.constructor && (value.constructor as any).$$id === HSL_SYMBOL;
github ifiokjr / remirror / @remirror / core-utils / src / dom-utils.ts View on Github external
export const isObjectNode = (value: unknown): value is ObjectNode =>
  isObject(value) && (value as PlainObject).type === 'doc' && Array.isArray((value as PlainObject).content);
github ifiokjr / remirror / @remirror / core-utils / src / dom-utils.ts View on Github external
export const isNodeSelection = (
  value: unknown,
): value is NodeSelection => isObject(value) && value instanceof NodeSelection;
github ifiokjr / remirror / @remirror / core / src / extension-helpers.ts View on Github external
export const isExtension = (extension: unknown): extension is AnyExtension =>
  isObject(extension) && extension.toString() === RemirrorClassName.Extension;
github ifiokjr / remirror / @remirror / react-utils / src / react-utils.ts View on Github external
export const isValidElement = (value: unknown): value is ReactElement =>
  isObject(value) && reactIsValidElement(value);
github ifiokjr / remirror / @remirror / react-utils / src / react-utils.ts View on Github external
export const isRemirrorElement = (
  value: unknown,
): value is RemirrorElement => {
  return bool(
    isObject(value) &&
      isValidElement(value) &&
      (value.type as RemirrorComponentType).$$remirrorType,
  );
};