beautiful-dom
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -17,3 +17,4 @@ declare class HTMLElementData { | ||
querySelector(query: string): HTMLElementData; | ||
getAttribute(attribute: string): (string | null); | ||
} | ||
export default HTMLElementData; |
@@ -532,4 +532,10 @@ "use strict"; | ||
}; | ||
HTMLElementData.prototype.getAttribute = function (attribute) { | ||
var attributeRegExp = new RegExp(attribute + "\\s*=\\s*('|\")(.*?)(\"|')", 'mi'); | ||
var outerHTML = this.outerHTML.slice(this.outerHTML.indexOf('<'), this.outerHTML.indexOf('>') + 1); | ||
var match = outerHTML.match(attributeRegExp); | ||
return match ? match[2] : null; | ||
}; | ||
return HTMLElementData; | ||
}()); | ||
exports.default = HTMLElementData; |
@@ -1,1 +0,2 @@ | ||
export { default as BeautifulDom } from './beautifuldom'; | ||
import BeautifulDom from './beautifuldom'; | ||
export default BeautifulDom; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var beautifuldom_1 = require("./beautifuldom"); | ||
exports.BeautifulDom = beautifuldom_1.default; | ||
var beautifuldom_1 = __importDefault(require("./beautifuldom")); | ||
module.exports = beautifuldom_1.default; |
{ | ||
"name": "beautiful-dom", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -8,4 +8,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"build":"tsc", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "jest" | ||
}, | ||
@@ -12,0 +11,0 @@ "keywords": ["dom","html","xml","parser","crawler"], |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
73791
11
1235
1
0
112