Comparing version 1.0.5 to 1.0.6
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 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3954
3
7
32
1
+ Addedjsdom@^9.9.1
+ Addedabab@1.0.4(transitive)
+ Addedacorn@4.0.13(transitive)
+ Addedacorn-globals@3.1.0(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedarray-equal@1.0.2(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcontent-type-parser@1.0.2(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addedcssom@0.3.8(transitive)
+ Addedcssstyle@0.2.37(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedescodegen@1.14.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhtml-encoding-sniffer@1.0.2(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjsdom@9.12.0(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednwmatcher@1.4.4(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedparse5@1.5.1(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedsymbol-tree@3.2.4(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedwebidl-conversions@3.0.14.0.2(transitive)
+ Addedwhatwg-encoding@1.0.5(transitive)
+ Addedwhatwg-url@4.8.0(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedxml-name-validator@2.0.1(transitive)