New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hasdom

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hasdom

Check if a JavaScript environment has a real DOM

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
15
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

hasdom

Check if a JavaScript environment has a real DOM.

Well, javascript environment is more complicated than you have ever thought. When we talk about environment, most of us knows about web browser and node.js. But that's not complete.

If you have heard some game engines based on javascript such as Egret, Cocos2d-js and layabox, then you will realize that you are misunderstanding this word.

Node.js

npm install hasdom
var hasDOM = require('../dist/hasdom').hasDOM

console.log('dom support: ')
console.log(hasDOM())

Web Page

require(['hasdom'], function(_) {
	document.write('<h1>dom support: ' + _.hasDOM() + '<h1>')
})

Source Code

Written in ECMAScript 6 with AMD / CommonJS / UMD support

Build Tools

  • gulp
  • babel
  • jshint
  • esperanto
  • uglify

Keywords

dom

FAQs

Package last updated on 30 Jun 2015

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