Comparing version
@@ -1,2 +0,2 @@ | ||
var scrapq=function(t){var e={};function r(n){if(e[n])return e[n].exports;var u=e[n]={i:n,l:!1,exports:{}};return t[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var u in t)r.d(n,u,function(e){return t[e]}.bind(null,u));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),u=r(2),c=r(3);function o(t){return"type"in t&&"select"in t}function i(t,e,r){switch(r.type){case"text":var n=""===r.select?t(e).text():t(r.select,e).text();return n&&n.trim();case"attr":return(f=""===r.select?e:t(r.select,e)).attr(r.attr);case"count":return(c=t(r.select,e)).length;case"exists":return!!(c=t(r.select,e)).length;case"list":for(var u=[],c=t(r.select,e),l=0;l<c.length;l++){var f=c.eq(l),a=o(r.query)?i(t,f,r.query):s(t,f,r.query,{});u.push(a)}return u;case"html":if(""===r.select)return t(e).html();var p=(f=t(r.select,e)).html();return"string"==typeof p?p.trim():p;default:throw new Error('Undefined selector "'+JSON.stringify(r)+'"')}}function s(t,e,r,n){return Object.keys(r).forEach((function(u){var c=r[u];o(c)?n[u]=i(t,e,c):n[u]=s(t,e,c,{})})),n}e.scrap=function(t,e){var r=n.load(t),u=r.root();return o(e)?i(r,u,e):s(r,u,e,{})},e.$={attr:u.attr,text:u.text,count:u.count,list:c.list,html:u.html,exists:u.exists}},function(t,e){t.exports=cheerio},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attr=function(t,e){return{type:"attr",select:t,attr:e}},e.text=function(t){return{type:"text",select:t}},e.count=function(t){return{type:"count",select:t}},e.html=function(t){return{type:"html",select:t}},e.exists=function(t){return{type:"exists",select:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.list=function(t,e){return{type:"list",select:t,query:e}}}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9zY3JhcHEvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vc2NyYXBxLy4vbGliL2luZGV4LnRzIiwid2VicGFjazovL3NjcmFwcS9leHRlcm5hbCBcImNoZWVyaW9cIiIsIndlYnBhY2s6Ly9zY3JhcHEvLi9saWIvc2VsZWN0b3JzLnRzIiwid2VicGFjazovL3NjcmFwcS8uL2xpYi9jb250cm9scy50cyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsImlzU2VsZWN0b3JPckNvbnRyb2wiLCJ0ZXN0Ii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biAgICAgICAgY2FzZSBcImNvdW50XCI6IHtcbiAgICAgICAgICAgIGNvbnN0IGVscyA9ICQoc2VsZWN0b3Iuc2VsZWN0LCBjb250ZXh0KTtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ID0gZWxzLmxlbmd0aDtcbiAgICAgICAgICAgIHJldHVybiBjb3VudDtcbiAgICAgICAgfVxuICAgICAgICBjYXNlIFwiZXhpc3RzXCI6IHtcbiAgICAgICAgICAgIGNvbnN0IGVscyA9ICQoc2VsZWN0b3Iuc2VsZWN0LCBjb250ZXh0KTtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IGVscy5sZW5ndGggPyB0cnVlIDogZmFsc2U7XG4gICAgICAgICAgICByZXR1cm4gZXhpc3RzO1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJsaXN0XCI6IHtcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdDogYW55W10gPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGVscyA9ICQoc2VsZWN0b3Iuc2VsZWN0LCBjb250ZXh0KTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZWwgPSBlbHMuZXEoaSk7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2NyYXBlZEVsID0gaXNTZWxlY3Rvck9yQ29udHJvbChzZWxlY3Rvci5xdWVyeSlcbiAgICAgICAgICAgICAgICAgICAgPyBzY3JhcFNlbGVjdG9yKCQsIGVsLCBzZWxlY3Rvci5xdWVyeSlcbiAgICAgICAgICAgICAgICAgICAgOiBzY3JhcFF1ZXJ5KCQsIGVsLCBzZWxlY3Rvci5xdWVyeSwge30pO1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHNjcmFwZWRFbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9XG4gICAgICAgIGNhc2U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mluZyk6IEV4aXN0c1R5cGUge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6IFwiZXhpc3RzXCIsXG4gICAgICAgIHNlbGVjdDogc2VsZWN0b3JcbiAgICB9O1xufVxuIiwiaW1wb3J0IHsgQW55U2VsZWN0b3IgfSBmcm9tIFwiLi9zZWxlY3RvcnNcIjtcbmltcG9ydCB7IFF1ZXJ5IH0gZnJvbSBcIi4vaGVscGVyc1wiO1xuXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xUeXBlczxRPiB7XG4gICAgbGlzdDogQXJyYXk8UT47XG59XG5cbi8vIEVYUE9SVFNcblxuZXhwb3J0IGludGVyZmFjZSBMaXN0VHlwZTxRIGV4dGVuZHMgQW55U2VsZWN0b3IgfCBBbnlDb250cm9sIHwgUXVlcnk+IHtcbiAgICB0eXBlOiBcImxpc3RcIjtcbiAgICBzZWxlY3Q6IHN0cmluZztcbiAgICBxdWVyeTogUTtcbn1cblxuZXhwb3J0IHR5cGUgQW55Q29udHJvbCA9IExpc3RUeXBlPGFueT47XG5cbi8vIERTTFxuXG5leHBvcnQgZnVuY3Rpb24gbGlzdDxRIGV4dGVuZHMgUXVlcnkgfCBBbnlDb250cm9sIHwgQW55U2VsZWN0b3I+KHNlbGVjdG9yOiBzdHJpbmcsIHF1ZXJ5OiBRKTogTGlzdFR5cGU8UT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6IFwibGlzdFwiLFxuICAgICAgICBzZWxlY3Q6IHNlbGVjdG9yLFxuICAgICAgICBxdWVyeVxuICAgIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 | ||
var scrapq=function(t){var e={};function r(n){if(e[n])return e[n].exports;var u=e[n]={i:n,l:!1,exports:{}};return t[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var u in t)r.d(n,u,function(e){return t[e]}.bind(null,u));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),u=r(2),c=r(3);function o(t){return"type"in t&&"select"in t}function i(t,e,r){switch(r.type){case"text":var n=""===r.select?t(e).text():t(r.select,e).text();return n&&n.trim();case"attr":return(f=""===r.select?e:t(r.select,e)).attr(r.attr);case"count":return(c=t(r.select,e)).length;case"exist":return!!(c=t(r.select,e)).length;case"list":for(var u=[],c=t(r.select,e),s=0;s<c.length;s++){var f=c.eq(s),a=o(r.query)?i(t,f,r.query):l(t,f,r.query,{});u.push(a)}return u;case"html":if(""===r.select)return t(e).html();var p=(f=t(r.select,e)).html();return"string"==typeof p?p.trim():p;default:throw new Error('Undefined selector "'+JSON.stringify(r)+'"')}}function l(t,e,r,n){return Object.keys(r).forEach((function(u){var c=r[u];o(c)?n[u]=i(t,e,c):n[u]=l(t,e,c,{})})),n}e.scrap=function(t,e){var r=n.load(t),u=r.root();return o(e)?i(r,u,e):l(r,u,e,{})},e.$={attr:u.attr,text:u.text,count:u.count,list:c.list,html:u.html,exist:u.exist}},function(t,e){t.exports=cheerio},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attr=function(t,e){return{type:"attr",select:t,attr:e}},e.text=function(t){return{type:"text",select:t}},e.count=function(t){return{type:"count",select:t}},e.html=function(t){return{type:"html",select:t}},e.exist=function(t){return{type:"exist",select:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.list=function(t,e){return{type:"list",select:t,query:e}}}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9zY3JhcHEvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vc2NyYXBxLy4vbGliL2luZGV4LnRzIiwid2VicGFjazovL3NjcmFwcS9leHRlcm5hbCBcImNoZWVyaW9cIiIsIndlYnBhY2s6Ly9zY3JhcHEvLi9saWIvc2VsZWN0b3JzLnRzIiwid2VicGFjazovL3NjcmFwcS8uL2xpYi9jb250cm9scy50cyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsImlzU2VsZWN0b3JPckNvbnRyb2wiLCJ0ZXN0Iiwic2NyYXBTZWxlY3RvciIsIiQiLCJjb250ZXh0Iiwic2VsZWN0b3IiLCJ0eXBlIiwic2VsZWN0IiwidGV4dCIsInRyaW0iLCJlbCIsImF0dHIiLCJlbHMiLCJsZW5ndGgiLCJyZXN1bHQiLCJlcSIsInNjcmFwZWRFbCIsInF1ZXJ5Iiwic2NyYXBRdWVyeSIsInB1c2giLCJodG1sIiwiRXJ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lbGVjdG9yIHwgQW55Q29udHJvbCkge1xuICAgIGlmICgoXCJ0eXBlXCIgaW4gdGVzdCkgJiYgKFwic2VsZWN0XCIgaW4gdGVzdCkpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbn1cblxuZnVuY3Rpb24gc2NyYXBTZWxlY3RvcigkOiBDaGVlcmlvU3RhdGljLCBjb250ZXh0OiBDaGVlcmlvLCBzZWxlY3RvcjogQW55U2VsZWN0b3IgfCBBbnlDb250cm9sKSB7XG4gICAgc3dpdGNoIChzZWxlY3Rvci50eXBlKSB7XG4gICAgICAgIGNhc2UgXCJ0ZXh0XCI6IHtcbiAgICAgICAgICAgIGNvbnN0IHRleHQgPSAoc2VsZWN0b3Iuc2VsZWN0ID09PSBcIlwiKVxuICAgICAgICAgICAgICAgID8gJChjb250ZXh0KS50ZXh0KClcbiAgICAgICAgICAgICAgICA6ICQoc2VsZWN0b3Iuc2VsZWN0LCBjb250ZXh0KS50ZXh0KCk7XG4gICAgICAgICAgICByZXR1cm4gdGV4dCAmJiB0ZXh0LnRyaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBjYXNlIFwiYXR0clwiOiB7XG4gICAgICAgICAgICBjb25zdCBlbCA9IChzZWxlY3Rvci5zZWxlY3QgPT09IFwiXCIpXG4gICAgICAgICAgICAgICAgPyBjb250ZXh0XG4gICAgICAgICAgICAgICAgOiAkKHNlbGVjdG9yLnNlbGVjdCwgY29udGV4dCk7XG4gICAgICAgICAgICBjb25zdCBhdHRyID0gZWwuYXR0cihzZWxlY3Rvci5hdHRyKTtcbiAgICAgICAgICAgIHJldHVybiBhdHRyO1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJjb3VudFwiOiB7XG4gICAgICAgICAgICBjb25zdCBlbHMgPSAkKHNlbGVjdG9yLnNlbGVjdCwgY29udGV4dCk7XG4gICAgICAgICAgICBjb25zdCBjb3VudCA9IGVscy5sZW5ndGg7XG4gICAgICAgICAgICByZXR1cm4gY291bnQ7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSBcImV4aXN0XCI6IHtcbiAgICAgICAgICAgIGNvbnN0IGVscyA9ICQoc2VsZWN0b3Iuc2VsZWN0LCBjb250ZXh0KTtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0ID0gZWxzLmxlbmd0aCA/IHRydWUgOiBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybiBleGlzdDtcbiAgICAgICAgfVxuICAgICAgICBjYXNlIFwibGlzdFwiOiB7XG4gICAgICAgICAgICBjb25zdCByZXN1bHQ6IGFueVtdID0gW107XG4gICAgICAgICAgICBjb25zdCBlbHMgPSAkKHNlbGVjdG9yLnNlbGVjdCwgY29udGV4dCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVscy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGVsID0gZWxzLmVxKGkpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHNjcmFwZWRFbCA9IGlzU2VsZWN0b3JPckNvbnRyb2woc2VsZWN0b3IucXVlcnkpXG4gICAgICAgICAgICAgICAgICAgID8gc2NyYXBTZWxlY3RvcigkLCBlbCwgc2VsZWN0b3IucXVlcnkpXG4gICAgICAgICAgICAgICAgICAgIDogc2NyYXBRdWVyeSgkLCBlbCwgc2VsZWN0b3IucXVlcnksIHt9KTtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaChzY3JhcGVkRWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfVxuICAgICAgICBjYXNlIFwiaHRtbFwiOiB7XG4gICAgICAgICAgICBpZiAoc2VsZWN0b3Iuc2VsZWN0ID09PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaHRtbCA9ICQoY29udGV4dCkuaHRtbCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xuICAgICAgICAgICA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IH0gZnJvbSBcIi4vaGVscGVyc1wiO1xuXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xUeXBlczxRPiB7XG4gICAgbGlzdDogQXJyYXk8UT47XG59XG5cbi8vIEVYUE9SVFNcblxuZXhwb3J0IGludGVyZmFjZSBMaXN0VHlwZTxRIGV4dGVuZHMgQW55U2VsZWN0b3IgfCBBbnlDb250cm9sIHwgUXVlcnk+IHtcbiAgICB0eXBlOiBcImxpc3RcIjtcbiAgICBzZWxlY3Q6IHN0cmluZztcbiAgICBxdWVyeTogUTtcbn1cblxuZXhwb3J0IHR5cGUgQW55Q29udHJvbCA9IExpc3RUeXBlPGFueT47XG5cbi8vIERTTFxuXG5leHBvcnQgZnVuY3Rpb24gbGlzdDxRIGV4dGVuZHMgUXVlcnkgfCBBbnlDb250cm9sIHwgQW55U2VsZWN0b3I+KHNlbGVjdG9yOiBzdHJpbmcsIHF1ZXJ5OiBRKTogTGlzdFR5cGU8UT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6IFwibGlzdFwiLFxuICAgICAgICBzZWxlY3Q6IHNlbGVjdG9yLFxuICAgICAgICBxdWVyeVxuICAgIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 |
@@ -11,3 +11,3 @@ import { AnySelector } from "./selectors"; | ||
html: string; | ||
exists: boolean; | ||
exist: boolean; | ||
} | ||
@@ -14,0 +14,0 @@ export declare type TypeOfQuery<Q extends AnySelector | ListType<any> | Query> = { |
@@ -1,2 +0,2 @@ | ||
import { AnySelector, text, count, attr, html, exists } from "./selectors"; | ||
import { AnySelector, text, count, attr, html, exist } from "./selectors"; | ||
import { Query, TypeOfQuery } from "./helpers"; | ||
@@ -11,3 +11,3 @@ import { AnyControl, list } from "./controls"; | ||
html: typeof html; | ||
exists: typeof exists; | ||
exist: typeof exist; | ||
}; |
@@ -32,6 +32,6 @@ "use strict"; | ||
} | ||
case "exists": { | ||
case "exist": { | ||
var els = $(selector.select, context); | ||
var exists_1 = els.length ? true : false; | ||
return exists_1; | ||
var exist_1 = els.length ? true : false; | ||
return exist_1; | ||
} | ||
@@ -97,4 +97,4 @@ case "list": { | ||
html: selectors_1.html, | ||
exists: selectors_1.exists, | ||
exist: selectors_1.exist, | ||
}; | ||
//# sourceMappingURL=index.js.map |
// Generated by dts-bundle v0.7.3 | ||
declare module 'scrapq' { | ||
import { AnySelector, text, count, attr, html, exists } from "scrapq/selectors"; | ||
import { AnySelector, text, count, attr, html, exist } from "scrapq/selectors"; | ||
import { Query, TypeOfQuery } from "scrapq/helpers"; | ||
@@ -14,3 +14,3 @@ import { AnyControl, list } from "scrapq/controls"; | ||
html: typeof html; | ||
exists: typeof exists; | ||
exist: typeof exist; | ||
}; | ||
@@ -37,7 +37,7 @@ } | ||
} | ||
interface ExistsType { | ||
type: "exists"; | ||
interface ExistType { | ||
type: "exist"; | ||
select: string; | ||
} | ||
export type AnySelector = TextType | AttrType | CountType | HtmlType | ExistsType; | ||
export type AnySelector = TextType | AttrType | CountType | HtmlType | ExistType; | ||
export function attr(selector: string, attribute: string): AttrType; | ||
@@ -47,3 +47,3 @@ export function text(selector: string): TextType; | ||
export function html(selector: string): HtmlType; | ||
export function exists(selector: string): ExistsType; | ||
export function exist(selector: string): ExistType; | ||
export {}; | ||
@@ -63,3 +63,3 @@ } | ||
html: string; | ||
exists: boolean; | ||
exist: boolean; | ||
} | ||
@@ -66,0 +66,0 @@ export type TypeOfQuery<Q extends AnySelector | ListType<any> | Query> = { |
@@ -18,7 +18,7 @@ interface CountType { | ||
} | ||
interface ExistsType { | ||
type: "exists"; | ||
interface ExistType { | ||
type: "exist"; | ||
select: string; | ||
} | ||
export declare type AnySelector = TextType | AttrType | CountType | HtmlType | ExistsType; | ||
export declare type AnySelector = TextType | AttrType | CountType | HtmlType | ExistType; | ||
export declare function attr(selector: string, attribute: string): AttrType; | ||
@@ -28,3 +28,3 @@ export declare function text(selector: string): TextType; | ||
export declare function html(selector: string): HtmlType; | ||
export declare function exists(selector: string): ExistsType; | ||
export declare function exist(selector: string): ExistType; | ||
export {}; |
@@ -33,9 +33,9 @@ "use strict"; | ||
exports.html = html; | ||
function exists(selector) { | ||
function exist(selector) { | ||
return { | ||
type: "exists", | ||
type: "exist", | ||
select: selector | ||
}; | ||
} | ||
exports.exists = exists; | ||
exports.exist = exist; | ||
//# sourceMappingURL=selectors.js.map |
{ | ||
"name": "scrapq", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Lightweight Typescript library for scrapping html", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65752
0.04%