xml-twig 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +3 -1
  2. package/doc/build.sh +6 -6
  3. package/package.json +38 -38
package/README.md CHANGED
@@ -140,7 +140,7 @@ With option `{ namespaces : true }` you will get access to the `.namespace` prop
140
140
  }
141
141
 
142
142
  const parser = twig.createParser({ tag: twig.Any, function: anyHandler })
143
- // or with Regular Expression -> `{ tag: /i/, function: anyHandler }`
143
+ // or with Regular Expression -> `{ tag: /./, function: anyHandler }`
144
144
  // or with Function -> `{ tag: () => {return true}, function: anyHandler }`
145
145
  fs.createReadStream(`${__dirname}/bookstore.xml`).pipe(parser)
146
146
 
@@ -339,6 +339,8 @@ For methods which return a single **Twig** element (e.g. `elt.next("book")`) the
339
339
 
340
340
  `.isLastChild` - **boolean**: `true` if the element is the last child in the parent
341
341
 
342
+ `.index` - **integer**: The postion (starting at 0) of the element within the parent. The root element returns always 0
343
+
342
344
  `.name` - **string**: Name of the element/tag
343
345
 
344
346
  `.tag` - **string**: Synonym for `name`
package/doc/build.sh CHANGED
@@ -1,6 +1,6 @@
1
- #!/bin/bash
2
-
3
- jsdoc2md --private ../twig.js > ./twig.md
4
-
5
- # see https://github.com/jsdoc2md/jsdoc-to-markdown
6
-
1
+ #!/bin/bash
2
+
3
+ jsdoc2md --private ../twig.js > ./twig.md
4
+
5
+ # see https://github.com/jsdoc2md/jsdoc-to-markdown
6
+
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "dependencies": {
3
- "sax": "^1.3.0",
4
- "xml-writer": "^1.7.0"
5
- },
6
- "name": "xml-twig",
7
- "description": "Node module for processing huge XML documents in tree mode",
8
- "version": "1.1.1",
9
- "main": "twig.js",
10
- "directories": {
11
- "doc": "doc"
12
- },
13
- "devDependencies": {
14
- "jsdoc-to-markdown": "^8.0.0",
15
- "luxon": "^2.1.1",
16
- "node-expat": "^2.4.0"
17
- },
18
- "scripts": {
19
- "test": "node demo.js"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/Wernfried/xml-twig.git"
24
- },
25
- "keywords": [
26
- "xml",
27
- "sax",
28
- "expat",
29
- "parser",
30
- "xml-reader"
31
- ],
32
- "author": "Wernfried Domscheit",
33
- "license": "ISC",
34
- "bugs": {
35
- "url": "https://github.com/Wernfried/xml-twig/issues"
36
- },
37
- "homepage": "https://github.com/Wernfried/xml-twig#readme"
38
- }
1
+ {
2
+ "dependencies": {
3
+ "sax": "^1.3.0",
4
+ "xml-writer": "^1.7.0"
5
+ },
6
+ "name": "xml-twig",
7
+ "description": "Node module for processing huge XML documents in tree mode",
8
+ "version": "1.1.3",
9
+ "main": "twig.js",
10
+ "directories": {
11
+ "doc": "doc"
12
+ },
13
+ "devDependencies": {
14
+ "jsdoc-to-markdown": "^8.0.0",
15
+ "luxon": "^2.1.1",
16
+ "node-expat": "^2.4.0"
17
+ },
18
+ "scripts": {
19
+ "test": "node demo.js"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/Wernfried/xml-twig.git"
24
+ },
25
+ "keywords": [
26
+ "xml",
27
+ "sax",
28
+ "expat",
29
+ "parser",
30
+ "xml-reader"
31
+ ],
32
+ "author": "Wernfried Domscheit",
33
+ "license": "ISC",
34
+ "bugs": {
35
+ "url": "https://github.com/Wernfried/xml-twig/issues"
36
+ },
37
+ "homepage": "https://github.com/Wernfried/xml-twig#readme"
38
+ }