Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-dom

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-dom - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

.npmignore

21

index.js

@@ -1,15 +0,10 @@

/*global window*/
module.exports = isNode
/**
* Check if object is dom node.
*
* @param {Object} val
* @return {Boolean}
* @api public
*/
module.exports = function isNode(val){
if (!val || typeof val !== 'object') return false;
if (window && 'object' == typeof window.Node) return val instanceof window.Node;
return 'number' == typeof val.nodeType && 'string' == typeof val.nodeName;
function isNode (val) {
return (!val || typeof val !== 'object')
? false
: (window && typeof window.Node === 'object')
? (val instanceof window.Node)
: (typeof val.nodeType === 'number') &&
(typeof val.nodeName === 'string')
}
{
"name": "is-dom",
"version": "1.0.5",
"version": "1.0.6",
"description": "Check if the given object is a dom node",
"main": "index.js",
"scripts": {
"test": "make test"
"test": "standard && nyc node test.js",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov"
},

@@ -18,16 +19,10 @@ "repository": "npm-dom/is-dom",

"license": "MIT",
"dependencies": {},
"dependencies": {
"jsdom": "^9.9.1"
},
"devDependencies": {
"istanbul": "^0.3.2",
"jsdom": "^1.0.1",
"make-lint": "^1.0.1",
"mocha": "^1.21.4",
"should": "^4.0.4"
},
"files": [
"lib",
"LICENSE",
"index.js",
"HISTORY.md"
]
"nyc": "^10.0.0",
"standard": "^8.6.0",
"tape": "^4.6.3"
}
}

@@ -10,4 +10,4 @@ # is-dom

## Installation
```bash
npm install is-dom
```sh
$ npm install is-dom
```

@@ -17,5 +17,5 @@

```js
var isDom = require('is-dom');
var isDom = require('is-dom')
isDom(window.document);
isDom(window.document)
// => true

@@ -22,0 +22,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc