index.d.ts 540 B

12345678910111213
  1. /**
  2. * Check if the given value is *inter-element whitespace*.
  3. *
  4. * @param {Nodes | string} thing
  5. * Thing to check (`Node` or `string`).
  6. * @returns {boolean}
  7. * Whether the `value` is inter-element whitespace (`boolean`): consisting of
  8. * zero or more of space, tab (`\t`), line feed (`\n`), carriage return
  9. * (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
  10. * whose `value` field is checked.
  11. */
  12. export function whitespace(thing: Nodes | string): boolean;
  13. export type Nodes = import('hast').Nodes;