UNPKG

@liveblocks/react-ui

Version:

A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.

1 lines 717 B
{"version":3,"file":"is-text.cjs","sources":["../../../src/slate/utils/is-text.ts"],"sourcesContent":["import type { Node, Text } from \"slate\";\n\nexport function isText(element: Node): element is Text {\n return (\n !(\"type\" in element) &&\n \"text\" in element &&\n typeof element.text === \"string\"\n );\n}\n\nexport function isPlainText(node: Node): boolean {\n return isText(node) && Object.keys(node).length === 1;\n}\n"],"names":[],"mappings":";;AAEO,SAAS,OAAO,OAAgC,EAAA;AACrD,EAAA,OACE,EAAE,MAAU,IAAA,OAAA,CAAA,IACZ,UAAU,OACV,IAAA,OAAO,QAAQ,IAAS,KAAA,QAAA,CAAA;AAE5B,CAAA;AAEO,SAAS,YAAY,IAAqB,EAAA;AAC/C,EAAA,OAAO,OAAO,IAAI,CAAA,IAAK,OAAO,IAAK,CAAA,IAAI,EAAE,MAAW,KAAA,CAAA,CAAA;AACtD;;;;;"}