dom-iterator
Advanced tools
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "description": "iterate through DOM nodes", | ||
| "version": "0.3.0", | ||
| "version": "1.0.0", | ||
| "keywords": [ | ||
@@ -8,0 +8,0 @@ "iterate", |
+2
-12
@@ -5,16 +5,6 @@ /** | ||
| var xor, props; | ||
| var xor = require('component-xor'); | ||
| var props = require('component-props'); | ||
| try { | ||
| xor = require('component-xor'); | ||
| } catch (e) { | ||
| xor = require('xor'); | ||
| } | ||
| try { | ||
| props = require('component-props'); | ||
| } catch (e) { | ||
| props = require('props'); | ||
| } | ||
| /** | ||
@@ -21,0 +11,0 @@ * Export `Iterator` |
+3
-6
| { | ||
| "name": "dom-iterator", | ||
| "version": "0.3.0", | ||
| "version": "1.0.0", | ||
| "description": "iterator for mini-html-parser", | ||
@@ -11,6 +11,7 @@ "main": "index.js", | ||
| "dependencies": { | ||
| "component-xor": "0.0.3", | ||
| "component-xor": "0.0.4", | ||
| "component-props": "1.1.1" | ||
| }, | ||
| "devDependencies": { | ||
| "chalk": "2.1.0", | ||
| "mini-html-parser": "0.0.3", | ||
@@ -20,6 +21,2 @@ "mocha": "~1.17.1", | ||
| }, | ||
| "browser": { | ||
| "xor": "component-xor", | ||
| "props": "component-props" | ||
| }, | ||
| "scripts": { | ||
@@ -26,0 +23,0 @@ "test": "make test" |
+7
-7
@@ -21,6 +21,6 @@ | ||
| ```js | ||
| var it = iterator(node).filter(Node.TEXT_NODE); | ||
| var it = iterator(node); | ||
| var next; | ||
| while (next = it.next()) { | ||
| while (next = it.next(Node.TEXT_NODE)) { | ||
| console.log(next.nodeValue) // next textnodes after node | ||
@@ -54,3 +54,3 @@ } | ||
| // select the 2nd element node we come across | ||
| var next = it.next(Node.ElementNode, 2) | ||
| var next = it.next(Node.ELEMENT_NODE, 2) | ||
| ``` | ||
@@ -74,3 +74,3 @@ | ||
| // select the 2nd element node we come across | ||
| var prev = it.prev(Node.ElementNode, 2) | ||
| var prev = it.prev(Node.ELEMENT_NODE, 2) | ||
| ``` | ||
@@ -90,3 +90,3 @@ | ||
| ```js | ||
| it.select(Node.ElementNode) | ||
| it.select(Node.ELEMENT_NODE) | ||
| .select(8) | ||
@@ -111,3 +111,3 @@ .select('nodeValue == "sloth"') | ||
| ```js | ||
| it.reject(Node.ElementNode) | ||
| it.reject(Node.ELEMENT_NODE) | ||
| .reject(8) | ||
@@ -176,3 +176,3 @@ .reject('nodeValue == "sloth"') | ||
| ```js | ||
| it.peek(Node.ElementNode, -3) // peek backwards 3 steps, only selecting element nodes | ||
| it.peek(Node.ELEMENT_NODE, -3) // peek backwards 3 steps, only selecting element nodes | ||
| ``` | ||
@@ -179,0 +179,0 @@ |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
-100%1
-50%27520
-0.67%4
33.33%9
-10%675
-1.32%+ Added
- Removed
Updated