slim.js 815 B

12345678910111213141516171819202122
  1. /** @file Alternative Entry point for Cheerio, excluding parse5. */
  2. /**
  3. * Types used in signatures of Cheerio methods.
  4. *
  5. * @category Cheerio
  6. */
  7. export * from './types.js';
  8. import { getLoad } from './load.js';
  9. import { getParse } from './parse.js';
  10. import render from 'dom-serializer';
  11. import { parseDocument } from 'htmlparser2';
  12. /**
  13. * Create a querying function, bound to a document created from the provided markup.
  14. *
  15. * @param content - Markup to be loaded.
  16. * @param options - Options for the created instance.
  17. * @param isDocument - Always `false` here, as we are always using `htmlparser2`.
  18. * @returns The loaded document.
  19. * @see {@link https://cheerio.js.org#loading} for additional usage information.
  20. */
  21. export const load = getLoad(getParse(parseDocument), render);
  22. //# sourceMappingURL=slim.js.map