New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@nleanba/ndjs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nleanba/ndjs

A JavaScript implementation of W3C DOM for Node.js

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

NDjs

A JavaScript implementation of W3C DOM for Node.js. It supports DOMParser and XMLSerializer interface such as in browser, it can also provide a window with a document for jQuery to work in Node.js.

Installation

Node.js

npm install ndjs

AMD

Follow the instruction of the environments you are using.

How to use

Node.js

var ndjs = require('ndjs');

var html = '<html><body>NDjs</body></html>';
var dom = new ndjs.DOMParser().parseFromString(html);
var window = ndjs.window(dom);

AMD

define(['ndjs'], function(ndjs){
    var html = '<html><body>NDjs</body></html>';
    var dom = new ndjs.DOMParser().parseFromString(html);
    var window = ndjs.window(dom);
});

Authors and Contributors

  • Jianwei Liu

License

NDjs is released under the MIT license.

Keywords

W3C

FAQs

Package last updated on 06 Oct 2018

Related posts