als-document 0.6.11 → 0.7.0

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.
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "als-document",
3
- "version": "0.6.11",
3
+ "version": "0.7.0",
4
4
  "description": "Build virtual dom from string and manage it, similar you do it on browser",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "node test/test.js"
8
- },
9
- "keywords": ["htmlparser","css query","cheerio","virtual dom"],
5
+ "main": "document.js",
6
+ "keywords": ["html parser","css query","cheerio","virtual dom"],
10
7
  "author": "Alex Sorkin",
11
8
  "license": "ISC",
12
9
  "dependencies": {}
package/readme.md CHANGED
@@ -35,6 +35,12 @@ Als-document is a library which includes 4 instruments:
35
35
  - [Attribs and check function](#attribs-and-check-function)
36
36
 
37
37
  ## Update
38
+ **New in 0.7.0**
39
+ * innerText - includes child elements
40
+ * inner - only child tet elements
41
+ * Proxy for style setter and delete fixed
42
+ * parsing attribute value inside '' in addition to ""
43
+
38
44
  **new in 0.6.1**
39
45
  * attribute parsing bug with '=' inside value, fixed
40
46
  * tag parsing improved
@@ -45,10 +51,10 @@ You can use als-document on node.js and in browser.
45
51
 
46
52
  For using in browser, just include:
47
53
  ``node_modules/als-document/document.js``
48
- or ``node_modules/als-document/document.min.js``.
54
+ or ``node_modules/als-document/document.mjs`` for script type=module.
49
55
 
50
56
  ```html
51
- <script src="node_modules/als-document/document.min.js"></script>
57
+ <script src="node_modules/als-document/document.js"></script>
52
58
  ```
53
59
 
54
60
  For using on backend, require from ``als-document``.
@@ -101,7 +107,8 @@ Each element (except root and text elements, which has no all) has:
101
107
  * ``n`` - separate elements in innerHTML by n. default n = '\n'
102
108
  * ``style`` - Proxy array of styles with camelCase property name
103
109
  * getters
104
- * ``innerText`` - concats all children's text together | ''
110
+ * ``inner`` - concats joined children text elements | ''
111
+ * ``innerText`` - concats joined children text elements and child elements text | ''
105
112
  * ``innerHTML`` - return innerHTML for element
106
113
  * ``outerHTML`` - return outerHTML for element
107
114
  * ``ancestors`` - return array of ancestors
@@ -46,5 +46,4 @@ let html1 = /*html*/`
46
46
  </body>
47
47
  </html>
48
48
  `
49
-
50
- try {module.exports = html1} catch{}
49
+ export default html1
@@ -1123,4 +1123,4 @@ let html2 = /*html*/`
1123
1123
  <iframe name="__tcfapiLocator" style="display: none;"></iframe><iframe name="__uspapiLocator" style="display: none;"></iframe><iframe src="https://www.google.com/recaptcha/api2/aframe" width="0" height="0" style="display: none;"></iframe></body></html>
1124
1124
  `
1125
1125
 
1126
- try { module.exports = html2 } catch { }
1126
+ export default html2