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

qsa-observer

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qsa-observer - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

cjs/index.js
'use strict';
const {document, MutationObserver, Set, WeakMap} = self;
const elements = element => 'querySelectorAll' in element;

@@ -3,0 +5,0 @@ const {filter} = [];

2

es.js

@@ -1,1 +0,1 @@

self.qsaObserver=function(e){"use strict";const t=e=>"querySelectorAll"in e,{filter:l}=[];return e.default=e=>{const r=new WeakMap,s=r=>{const{query:s}=e;if(s.length)for(let e=0,{length:a}=r;e<a;e++)o(l.call(r[e].addedNodes,t),!0,s),o(l.call(r[e].removedNodes,t),!1,s)},o=(t,l,s,n=new Set)=>{for(let c,d,h=0,{length:u}=t;h<u;h++)if(!n.has(d=t[h])){if(n.add(d),l)for(let t,o=a(d),n=0,{length:h}=s;n<h;n++)o.call(d,t=s[n])&&(r.has(d)||r.set(d,new Set),c=r.get(d),c.has(t)||(c.add(t),e.handle(d,l,t)));else r.has(d)&&(c=r.get(d),r.delete(d),c.forEach(t=>{e.handle(d,l,t)}));o(d.querySelectorAll(s),l,s,n)}},a=e=>e.matches||e.webkitMatchesSelector||e.msMatchesSelector,n=(t,l=!0)=>{o(t,l,e.query)},c=new MutationObserver(s),d=e.root||document,{query:h}=e;return c.observe(d,{childList:!0,subtree:!0}),h.length&&n(d.querySelectorAll(h)),{drop:e=>{for(let t=0,{length:l}=e;t<l;t++)r.delete(e[t])},flush:()=>{s(c.takeRecords())},observer:c,parse:n}},e}({}).default;
self.qsaObserver=function(e){"use strict";const{document:t,MutationObserver:l,Set:r,WeakMap:s}=self,o=e=>"querySelectorAll"in e,{filter:a}=[];return e.default=e=>{const n=new s,c=t=>{const{query:l}=e;if(l.length)for(let e=0,{length:r}=t;e<r;e++)d(a.call(t[e].addedNodes,o),!0,l),d(a.call(t[e].removedNodes,o),!1,l)},d=(t,l,s,o=new r)=>{for(let a,c,u=0,{length:f}=t;u<f;u++)if(!o.has(c=t[u])){if(o.add(c),l)for(let t,o=h(c),d=0,{length:u}=s;d<u;d++)o.call(c,t=s[d])&&(n.has(c)||n.set(c,new r),a=n.get(c),a.has(t)||(a.add(t),e.handle(c,l,t)));else n.has(c)&&(a=n.get(c),n.delete(c),a.forEach(t=>{e.handle(c,l,t)}));d(c.querySelectorAll(s),l,s,o)}},h=e=>e.matches||e.webkitMatchesSelector||e.msMatchesSelector,u=(t,l=!0)=>{d(t,l,e.query)},f=new l(c),i=e.root||t,{query:g}=e;return f.observe(i,{childList:!0,subtree:!0}),g.length&&u(i.querySelectorAll(g)),{drop:e=>{for(let t=0,{length:l}=e;t<l;t++)n.delete(e[t])},flush:()=>{c(f.takeRecords())},observer:f,parse:u}},e}({}).default;

@@ -0,1 +1,3 @@

const {document, MutationObserver, Set, WeakMap} = self;
const elements = element => 'querySelectorAll' in element;

@@ -2,0 +4,0 @@ const {filter} = [];

self.qsaObserver = (function (exports) {
'use strict';
var _self = self,
document = _self.document,
MutationObserver = _self.MutationObserver,
Set = _self.Set,
WeakMap = _self.WeakMap;
var elements = function elements(element) {

@@ -5,0 +11,0 @@ return 'querySelectorAll' in element;

@@ -1,1 +0,1 @@

self.qsaObserver=function(e){"use strict";var t=function(e){return"querySelectorAll"in e},r=[].filter;return e.default=function(e){var n=new WeakMap,l=function(n){var l=e.query;if(l.length)for(var a=0,c=n.length;a<c;a++)o(r.call(n[a].addedNodes,t),!0,l),o(r.call(n[a].removedNodes,t),!1,l)},o=function t(r,l,o){for(var c,u,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set,f=function(f,i,d,h){if(!s.has(i=r[d])){if(s.add(i),l)for(var v,g=a(i),q=0,S=o.length;q<S;q++)g.call(i,v=o[q])&&(n.has(i)||n.set(i,new Set),(f=n.get(i)).has(v)||(f.add(v),e.handle(i,l,v)));else n.has(i)&&(f=n.get(i),n.delete(i),f.forEach((function(t){e.handle(i,l,t)})));t(i.querySelectorAll(o),l,o,s)}c=f,u=i},i=0,d=r.length;i<d;i++)f(c,u,i)},a=function(e){return e.matches||e.webkitMatchesSelector||e.msMatchesSelector},c=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o(t,r,e.query)},u=new MutationObserver(l),s=e.root||document,f=e.query;return u.observe(s,{childList:!0,subtree:!0}),f.length&&c(s.querySelectorAll(f)),{drop:function(e){for(var t=0,r=e.length;t<r;t++)n.delete(e[t])},flush:function(){l(u.takeRecords())},observer:u,parse:c}},e}({}).default;
self.qsaObserver=function(e){"use strict";var t=self,r=t.document,n=t.MutationObserver,l=t.Set,o=t.WeakMap,a=function(e){return"querySelectorAll"in e},c=[].filter;return e.default=function(e){var t=new o,u=function(t){var r=e.query;if(r.length)for(var n=0,l=t.length;n<l;n++)s(c.call(t[n].addedNodes,a),!0,r),s(c.call(t[n].removedNodes,a),!1,r)},s=function r(n,o,a){for(var c,u,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new l,i=function(i,d,h,v){if(!s.has(d=n[h])){if(s.add(d),o)for(var g,q=f(d),b=0,y=a.length;b<y;b++)q.call(d,g=a[b])&&(t.has(d)||t.set(d,new l),(i=t.get(d)).has(g)||(i.add(g),e.handle(d,o,g)));else t.has(d)&&(i=t.get(d),t.delete(d),i.forEach((function(t){e.handle(d,o,t)})));r(d.querySelectorAll(a),o,a,s)}c=i,u=d},d=0,h=n.length;d<h;d++)i(c,u,d)},f=function(e){return e.matches||e.webkitMatchesSelector||e.msMatchesSelector},i=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s(t,r,e.query)},d=new n(u),h=e.root||r,v=e.query;return d.observe(h,{childList:!0,subtree:!0}),v.length&&i(h.querySelectorAll(v)),{drop:function(e){for(var r=0,n=e.length;r<n;r++)t.delete(e[r])},flush:function(){u(d.takeRecords())},observer:d,parse:i}},e}({}).default;
{
"name": "qsa-observer",
"version": "1.1.3",
"version": "1.1.4",
"description": "handle elements lifecycle through CSS selectors",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

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