@open-wc/semantic-dom-diff
Advanced tools
Comparing version 0.7.14 to 0.8.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.8.0](https://github.com/open-wc/open-wc/compare/@open-wc/semantic-dom-diff@0.7.14...@open-wc/semantic-dom-diff@0.8.0) (2019-03-23) | ||
### Features | ||
* add types + linting & improve intellisense ([b6d260c](https://github.com/open-wc/open-wc/commit/b6d260c)) | ||
## [0.7.14](https://github.com/open-wc/open-wc/compare/@open-wc/semantic-dom-diff@0.7.13...@open-wc/semantic-dom-diff@0.7.14) (2019-03-08) | ||
@@ -8,0 +19,0 @@ |
@@ -1,1 +0,1 @@ | ||
export { getDiffableSemanticHTML } from './src/get-dom-diff.js'; | ||
export { getDiffableSemanticHTML, getAST } from './src/get-dom-diff.js'; |
{ | ||
"name": "@open-wc/semantic-dom-diff", | ||
"version": "0.7.14", | ||
"version": "0.8.0", | ||
"description": "To compare dom and shadow dom trees. Part of open-wc recommendations", | ||
@@ -16,2 +16,7 @@ "author": "open-wc", | ||
}, | ||
"module": "index.js", | ||
"files": [ | ||
"src", | ||
"index.js" | ||
], | ||
"scripts": { | ||
@@ -32,4 +37,4 @@ "test": "karma start", | ||
"@bundled-es-modules/chai": "^4.2.0", | ||
"@open-wc/testing-karma": "^0.4.14", | ||
"@open-wc/testing-karma-bs": "^0.2.15", | ||
"@open-wc/testing-karma": "^0.4.15", | ||
"@open-wc/testing-karma-bs": "^0.2.16", | ||
"@open-wc/testing-wallaby": "^0.1.11", | ||
@@ -39,3 +44,3 @@ "mocha": "^5.0.0", | ||
}, | ||
"gitHead": "5b4f2a97c122930374fb7df415bf5ed5b88c9d1c" | ||
"gitHead": "a07b05ebc052791ad3b3075d5439016de3c059ed" | ||
} |
@@ -7,2 +7,9 @@ import { parseFragment, serialize } from '@bundled-es-modules/parse5'; | ||
/** | ||
* Returns an ast for a given string | ||
* | ||
* @param {string} value String to convert to AST | ||
* @param {Object} config Options | ||
* @returns {import('parse5').DefaultTreeElement} Ast | ||
*/ | ||
export function getAST(value, config = {}) { | ||
@@ -9,0 +16,0 @@ const ast = parseFragment(sanitizeHtmlString(value)); |
@@ -46,3 +46,3 @@ /* eslint-disable no-param-reassign */ | ||
* mutates input. | ||
* @param {ASTNode} node | ||
* @param {import('parse5').DefaultTreeElement} node | ||
* @param {string[]} ignoredTags | ||
@@ -57,4 +57,5 @@ */ | ||
node.childNodes = node.childNodes.filter(child => filterNode(child, ignoredTags)); | ||
// @ts-ignore | ||
node.childNodes.forEach(child => normalizeAST(child, ignoredTags)); | ||
} | ||
} |
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
16441
9
98