Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

page-parser-tree

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

page-parser-tree - npm Package Compare versions

Comparing version 0.2.2 to 0.2.4

js/makeFilteredEcChildLiveSet.js

33

js/makeLiveSetTransformerFromSelectors.js

@@ -17,6 +17,2 @@ 'use strict';

var _matchesSelectorNg = require('matches-selector-ng');
var _matchesSelectorNg2 = _interopRequireDefault(_matchesSelectorNg);
var _transduce = require('live-set/transduce');

@@ -38,6 +34,10 @@

var _makeElementChildLiveSet = require('./makeElementChildLiveSet');
var _makeFilteredEcChildLiveSet = require('./makeFilteredEcChildLiveSet');
var _makeElementChildLiveSet2 = _interopRequireDefault(_makeElementChildLiveSet);
var _makeFilteredEcChildLiveSet2 = _interopRequireDefault(_makeFilteredEcChildLiveSet);
var _makeMutationObserverLiveSet = require('./makeMutationObserverLiveSet');
var _makeMutationObserverLiveSet2 = _interopRequireDefault(_makeMutationObserverLiveSet);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -49,10 +49,4 @@

var itemString = item;
var filterXf = _transducers2.default.filter(function (el) {
return (0, _matchesSelectorNg2.default)(el, itemString);
});
var flatMapFn = function flatMapFn(ec) {
var transducer = _transducers2.default.compose(filterXf, _transducers2.default.map(function (el) {
return { el: el, parents: ec.parents };
}));
return (0, _transduce2.default)((0, _makeElementChildLiveSet2.default)(ec.el), transducer);
return (0, _makeFilteredEcChildLiveSet2.default)(ec, itemString);
};

@@ -70,3 +64,12 @@ return function (liveSet) {

} else if (item.$watch) {
throw new Error('TODO');
var _item$$watch = item.$watch,
attributeFilter = _item$$watch.attributeFilter,
cond = _item$$watch.cond;
var _flatMapFn = function _flatMapFn(ec) {
return (0, _makeMutationObserverLiveSet2.default)(ec, attributeFilter, cond);
};
return function (liveSet) {
return (0, _flatMap2.default)(liveSet, _flatMapFn);
};
} else if (item.$log) {

@@ -117,2 +120,2 @@ var $log = item.$log;

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYWtlTGl2ZVNldFRyYW5zZm9ybWVyRnJvbVNlbGVjdG9ycy5qcyJdLCJuYW1lcyI6WyJtYWtlTGl2ZVNldFRyYW5zZm9ybWVyRnJvbVNlbGVjdG9ycyIsInNlbGVjdG9ycyIsInRyYW5zZm9ybWVycyIsIm1hcCIsIml0ZW0iLCJpdGVtU3RyaW5nIiwiZmlsdGVyWGYiLCJmaWx0ZXIiLCJlbCIsImZsYXRNYXBGbiIsInRyYW5zZHVjZXIiLCJjb21wb3NlIiwicGFyZW50cyIsImVjIiwibGl2ZVNldCIsIiRvciIsInRyYW5zZm9ybWVyIiwiJHdhdGNoIiwiRXJyb3IiLCIkbG9nIiwiZmlsdGVyRm4iLCJjb25zb2xlIiwibG9nIiwidmFsdWUiLCIkZmlsdGVyIiwiJG1hcCIsInJlZHVjZSIsImNvbWJpbmVkIiwieCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztrQkFZd0JBLG1DOztBQVZ4Qjs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBSWUsU0FBU0EsbUNBQVQsQ0FBNkNDLFNBQTdDLEVBQXdJO0FBQ3JKLE1BQU1DLGVBQWVELFVBQVVFLEdBQVYsQ0FBYyxnQkFBUTtBQUN6QyxRQUFJLE9BQU9DLElBQVAsS0FBZ0IsUUFBcEIsRUFBOEI7QUFDNUIsVUFBTUMsYUFBYUQsSUFBbkI7QUFDQSxVQUFNRSxXQUFXLHNCQUFFQyxNQUFGLENBQVM7QUFBQSxlQUFNLGlDQUFnQkMsRUFBaEIsRUFBb0JILFVBQXBCLENBQU47QUFBQSxPQUFULENBQWpCO0FBQ0EsV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"version": "0.2.2",
"version": "0.2.4",
"description": "Create a TagTree of named elements out of an HTML page",

@@ -41,4 +41,5 @@ "main": "js/index.js",

"jest": "^18.1.0",
"jsdom": "^9.11.0",
"pdelay": "^1.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc