Socket
Book a DemoInstallSign in
Socket

@widitrade/universal-dom-parser

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@widitrade/universal-dom-parser

### Usage

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
2
Created
Source

universal-dom-parser

Usage

Make sure that whatever build system you are using (Webpack etc) is honoring the browser field in package.json. Then import the library and use it the same way you would use the browser native DOMParser.

let DOMParser = require('universal-dom-parser');
let parser = new DOMParser();
let doc = parser.parseFromString(`<html><body>Precious website</body></html>`, 'text/html');

Implementation

  • Uses jsdom in NodeJS and the native DOMParser in the browser

FAQs

Package last updated on 05 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts