europa-dom-cheerio

6.0.0 • Public • Published

europa-dom-cheerio

A Europa DOM wrapper using cheerio.

Build Status License Release

Install

Install using your preferred package manager. For example;

$ npm install --save europa-dom-cheerio

You will most likely never need to depend on europa-dom-cheerio directly. Instead, you will probably want to install either the node-europa or europa-worker package in order to use Europa within Node.js or a web worker.

API

import { Dom, Environment } from 'europa-core';
import { AnyNode, CheerioDom, CheerioDomRoot, Element } from 'europa-dom-cheerio';

const _dom = Symbol();

class ExampleEnvironment implements Environment<AnyNode, Element> {
  private readonly [_dom] = new CheerioDom();

  getDefaultBaseUri(): string { /* ... */ }

  getDefaultEndOfLineCharacter(): string { /* ... */ }

  getDom(): Dom<AnyNode, Element, CheerioDomRoot> {
    return this[_dom];
  }

  resolveUrl(baseUri: string, url: string): string { /* ... */ }
}

Bugs

If you have any problems with this Europa environment or would like to see changes currently in development you can do so here.

Contributors

If you want to contribute, you're a legend! Information on how you can do so can be found in CONTRIBUTING.md. We want your suggestions and pull requests!

A list of Europa contributors can be found in AUTHORS.md.

License

Copyright © 2022 neocotic

See LICENSE.md for more information on our MIT license.

/europa-dom-cheerio/

    Package Sidebar

    Install

    npm i europa-dom-cheerio

    Weekly Downloads

    124

    Version

    6.0.0

    License

    MIT

    Unpacked Size

    66.7 kB

    Total Files

    47

    Last publish

    Collaborators

    • neocotic