New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arrive

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arrive - npm Package Compare versions

Comparing version 2.3.1 to 2.4.1

2

bower.json
{
"name": "arrive",
"version": "2.3.1",
"version": "2.4.1",
"description": "Watch for DOM elements creation and removal.",

@@ -5,0 +5,0 @@ "main": "src/arrive.js",

/*
* arrive.js
* v2.3.1
* v2.4.1
* https://github.com/uzairfarooq/arrive
* MIT licensed
*
* Copyright (c) 2014-2016 Uzair Farooq
* Copyright (c) 2014-2017 Uzair Farooq
*/
var Arrive=function(a,b,c){"use strict";function l(a,b,c){e.addMethod(b,c,a.unbindEvent),e.addMethod(b,c,a.unbindEventWithSelectorOrCallback),e.addMethod(b,c,a.unbindEventWithSelectorAndCallback)}function m(a){a.arrive=j.bindEvent,l(j,a,"unbindArrive"),a.leave=k.bindEvent,l(k,a,"unbindLeave")}if(a.MutationObserver&&"undefined"!=typeof HTMLElement){var d=0,e=function(){var b=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(a,c){return a instanceof HTMLElement&&b.call(a,c)},addMethod:function(a,b,c){var d=a[b];a[b]=function(){return c.length==arguments.length?c.apply(this,arguments):"function"==typeof d?d.apply(this,arguments):void 0}},callCallbacks:function(a){for(var c,b=0;c=a[b];b++)c.callback.call(c.elem)},checkChildNodesRecursively:function(a,b,c,d){for(var g,f=0;g=a[f];f++)c(g,b,d)&&d.push({callback:b.callback,elem:g}),g.childNodes.length>0&&e.checkChildNodesRecursively(g.childNodes,b,c,d)},mergeArrays:function(a,b){var d,c={};for(d in a)c[d]=a[d];for(d in b)c[d]=b[d];return c},toElementsArray:function(b){return"undefined"==typeof b||"number"==typeof b.length&&b!==a||(b=[b]),b}}}(),f=function(){var a=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return a.prototype.addEvent=function(a,b,c,d){var e={target:a,selector:b,options:c,callback:d,firedElems:[]};return this._beforeAdding&&this._beforeAdding(e),this._eventsBucket.push(e),e},a.prototype.removeEvent=function(a){for(var c,b=this._eventsBucket.length-1;c=this._eventsBucket[b];b--)a(c)&&(this._beforeRemoving&&this._beforeRemoving(c),this._eventsBucket.splice(b,1))},a.prototype.beforeAdding=function(a){this._beforeAdding=a},a.prototype.beforeRemoving=function(a){this._beforeRemoving=a},a}(),g=function(b,d){var g=new f,h=this,i={fireOnAttributesModification:!1};return g.beforeAdding(function(c){var i,e=c.target;c.selector,c.callback;(e===a.document||e===a)&&(e=document.getElementsByTagName("html")[0]),i=new MutationObserver(function(a){d.call(this,a,c)});var j=b(c.options);i.observe(e,j),c.observer=i,c.me=h}),g.beforeRemoving(function(a){a.observer.disconnect()}),this.bindEvent=function(a,b,c){b=e.mergeArrays(i,b);for(var d=e.toElementsArray(this),f=0;f<d.length;f++)g.addEvent(d[f],a,b,c)},this.unbindEvent=function(){var a=e.toElementsArray(this);g.removeEvent(function(b){for(var d=0;d<a.length;d++)if(this===c||b.target===a[d])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(a){var f,b=e.toElementsArray(this),d=a;f="function"==typeof a?function(a){for(var e=0;e<b.length;e++)if((this===c||a.target===b[e])&&a.callback===d)return!0;return!1}:function(d){for(var e=0;e<b.length;e++)if((this===c||d.target===b[e])&&d.selector===a)return!0;return!1},g.removeEvent(f)},this.unbindEventWithSelectorAndCallback=function(a,b){var d=e.toElementsArray(this);g.removeEvent(function(e){for(var f=0;f<d.length;f++)if((this===c||e.target===d[f])&&e.selector===a&&e.callback===b)return!0;return!1})},this},h=function(){function h(a){var b={attributes:!1,childList:!0,subtree:!0};return a.fireOnAttributesModification&&(b.attributes=!0),b}function i(a,b){a.forEach(function(a){var c=a.addedNodes,d=a.target,f=[];null!==c&&c.length>0?e.checkChildNodesRecursively(c,b,k,f):"attributes"===a.type&&k(d,b,f)&&f.push({callback:b.callback,elem:node}),e.callCallbacks(f)})}function k(a,b,f){if(e.matchesSelector(a,b.selector)&&(a._id===c&&(a._id=d++),-1==b.firedElems.indexOf(a._id))){if(b.options.onceOnly){if(0!==b.firedElems.length)return;b.me.unbindEventWithSelectorAndCallback.call(b.target,b.selector,b.callback)}b.firedElems.push(a._id),f.push({callback:b.callback,elem:a})}}var f={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};j=new g(h,i);var l=j.bindEvent;return j.bindEvent=function(a,b,c){"undefined"==typeof c?(c=b,b=f):b=e.mergeArrays(f,b);var d=e.toElementsArray(this);if(b.existing){for(var g=[],h=0;h<d.length;h++)for(var i=d[h].querySelectorAll(a),j=0;j<i.length;j++)g.push({callback:c,elem:i[j]});if(b.onceOnly&&g.length)return c.call(g[0].elem);setTimeout(e.callCallbacks,1,g)}l.call(this,a,b,c)},j},i=function(){function d(a){var b={childList:!0,subtree:!0};return b}function f(a,b){a.forEach(function(a){var c=a.removedNodes,f=(a.target,[]);null!==c&&c.length>0&&e.checkChildNodesRecursively(c,b,h,f),e.callCallbacks(f)})}function h(a,b){return e.matchesSelector(a,b.selector)}var c={};k=new g(d,f);var i=k.bindEvent;return k.bindEvent=function(a,b,d){"undefined"==typeof d?(d=b,b=c):b=e.mergeArrays(c,b),i.call(this,a,b,d)},k},j=new h,k=new i;b&&m(b.fn),m(HTMLElement.prototype),m(NodeList.prototype),m(HTMLCollection.prototype),m(HTMLDocument.prototype),m(Window.prototype);var n={};return l(j,n,"unbindAllArrive"),l(k,n,"unbindAllLeave"),n}}(window,"undefined"==typeof jQuery?null:jQuery,void 0);
var Arrive=function(e,t,n){"use strict";function r(e,t,n){l.addMethod(t,n,e.unbindEvent),l.addMethod(t,n,e.unbindEventWithSelectorOrCallback),l.addMethod(t,n,e.unbindEventWithSelectorAndCallback)}function i(e){e.arrive=f.bindEvent,r(f,e,"unbindArrive"),e.leave=d.bindEvent,r(d,e,"unbindLeave")}if(e.MutationObserver&&"undefined"!=typeof HTMLElement){var o=0,l=function(){var t=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(e,n){return e instanceof HTMLElement&&t.call(e,n)},addMethod:function(e,t,r){var i=e[t];e[t]=function(){return r.length==arguments.length?r.apply(this,arguments):"function"==typeof i?i.apply(this,arguments):n}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var n,r=0;n=e[r];r++)n&&n.callback&&n.callback.call(n.elem,n.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,n,r){for(var i,o=0;i=e[o];o++)n(i,t,r)&&r.push({callback:t.callback,elem:i}),i.childNodes.length>0&&l.checkChildNodesRecursively(i.childNodes,t,n,r)},mergeArrays:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},toElementsArray:function(t){return n===t||"number"==typeof t.length&&t!==e||(t=[t]),t}}}(),c=function(){var e=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return e.prototype.addEvent=function(e,t,n,r){var i={target:e,selector:t,options:n,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},e.prototype.removeEvent=function(e){for(var t,n=this._eventsBucket.length-1;t=this._eventsBucket[n];n--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var r=this._eventsBucket.splice(n,1);r&&r.length&&(r[0].callback=null)}},e.prototype.beforeAdding=function(e){this._beforeAdding=e},e.prototype.beforeRemoving=function(e){this._beforeRemoving=e},e}(),a=function(t,r){var i=new c,o=this,a={fireOnAttributesModification:!1};return i.beforeAdding(function(n){var i,l=n.target;(l===e.document||l===e)&&(l=document.getElementsByTagName("html")[0]),i=new MutationObserver(function(e){r.call(this,e,n)});var c=t(n.options);i.observe(l,c),n.observer=i,n.me=o}),i.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,n){t=l.mergeArrays(a,t);for(var r=l.toElementsArray(this),o=0;o<r.length;o++)i.addEvent(r[o],e,t,n)},this.unbindEvent=function(){var e=l.toElementsArray(this);i.removeEvent(function(t){for(var r=0;r<e.length;r++)if(this===n||t.target===e[r])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(e){var t,r=l.toElementsArray(this),o=e;t="function"==typeof e?function(e){for(var t=0;t<r.length;t++)if((this===n||e.target===r[t])&&e.callback===o)return!0;return!1}:function(t){for(var i=0;i<r.length;i++)if((this===n||t.target===r[i])&&t.selector===e)return!0;return!1},i.removeEvent(t)},this.unbindEventWithSelectorAndCallback=function(e,t){var r=l.toElementsArray(this);i.removeEvent(function(i){for(var o=0;o<r.length;o++)if((this===n||i.target===r[o])&&i.selector===e&&i.callback===t)return!0;return!1})},this},s=function(){function e(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t}function t(e,t){e.forEach(function(e){var n=e.addedNodes,i=e.target,o=[];null!==n&&n.length>0?l.checkChildNodesRecursively(n,t,r,o):"attributes"===e.type&&r(i,t,o)&&o.push({callback:t.callback,elem:i}),l.callCallbacks(o,t)})}function r(e,t){return l.matchesSelector(e,t.selector)&&(e._id===n&&(e._id=o++),-1==t.firedElems.indexOf(e._id))?(t.firedElems.push(e._id),!0):!1}var i={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};f=new a(e,t);var c=f.bindEvent;return f.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t);var o=l.toElementsArray(this);if(t.existing){for(var a=[],s=0;s<o.length;s++)for(var u=o[s].querySelectorAll(e),f=0;f<u.length;f++)a.push({callback:r,elem:u[f]});if(t.onceOnly&&a.length)return r.call(a[0].elem,a[0].elem);setTimeout(l.callCallbacks,1,a)}c.call(this,e,t,r)},f},u=function(){function e(){var e={childList:!0,subtree:!0};return e}function t(e,t){e.forEach(function(e){var n=e.removedNodes,i=[];null!==n&&n.length>0&&l.checkChildNodesRecursively(n,t,r,i),l.callCallbacks(i,t)})}function r(e,t){return l.matchesSelector(e,t.selector)}var i={};d=new a(e,t);var o=d.bindEvent;return d.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t),o.call(this,e,t,r)},d},f=new s,d=new u;t&&i(t.fn),i(HTMLElement.prototype),i(NodeList.prototype),i(HTMLCollection.prototype),i(HTMLDocument.prototype),i(Window.prototype);var h={};return r(f,h,"unbindAllArrive"),r(d,h,"unbindAllLeave"),h}}(window,"undefined"==typeof jQuery?null:jQuery,void 0);
{
"name": "arrive",
"version": "2.3.1",
"version": "2.4.1",
"description": "arrive.js provides events to watch for DOM elements creation and removal. It makes use of Mutation Observers internally.",

@@ -14,3 +14,3 @@ "main": "src/arrive.js",

"type": "git",
"url": "git://git@github.com/uzairfarooq/arrive.git"
"url": "https://github.com/uzairfarooq/arrive.git"
},

@@ -17,0 +17,0 @@ "keywords": [

@@ -23,3 +23,3 @@ # arrive.js

**The library does not depend on jQuery, you can replace jQuery elements in the examples below with pure javascript elements and it would work fine.**
###Watch for elements creation
### Watch for elements creation
Use `arrive` event to watch for elements creation:

@@ -38,2 +38,8 @@ ```javascript

});
// as of v2.3.2, new element is also passed as argument to the callback function.
// This is to support arrow functions as 'this' is not bindable in arrow functions.
$(document).arrive(".test-elem", function(newElem) {
var $newElem = $(newElem);
});
```

@@ -72,3 +78,3 @@

####Options
#### Options
As of v2.0 `arrive` event accepts an optional `options` object as 2nd argument. Options object consists of following:

@@ -79,3 +85,3 @@ ```javascript

onceOnly: boolean // Defaults to false. Setting it to true would ensure that registered callbacks fire only once. No need to unbind the event if the attribute is set to true, it'll automatically unbind after firing once.
existing: boolean // Defaults to false. Setting it to true would ensure that the registered callback is fired for the elements that already exists in the DOM and match the selector. If options.onceOnly is set, the callback is only called once with the first element matching the selector.
existing: boolean // Defaults to false. Setting it to true would ensure that the registered callback is fired for the elements that already exist in the DOM and match the selector. If options.onceOnly is set, the callback is only called once with the first element matching the selector.
};

@@ -91,3 +97,3 @@ ```

###Watch for elements removal
### Watch for elements removal
Use `leave` event to watch for elements removal.

@@ -114,3 +120,3 @@ The first arugument to leave must not be a [descendent](https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_selectors) or [child](https://developer.mozilla.org/en-US/docs/Web/CSS/Child_selectors) selector i.e. you cannot pass `.page .test-elem`, instead, pass `.test-elem`. It's because of a limitation in MutationObserver's api.

##Browser Support
## Browser Support
arrive.js is built over [Mutation Observers](https://developer.mozilla.org/en/docs/Web/API/MutationObserver) which is introduced in DOM4. It's supported in latest versions of all popular browsers.

@@ -126,8 +132,8 @@

##Contributing
####Report a bug / Request a feature
## Contributing
#### Report a bug / Request a feature
If you want to report a bug or request a feature, use the [Issues](https://github.com/uzairfarooq/arrive/issues) section. Before creating a new issue, search the existing ones to make sure that you're not creating a duplicate. When reporting a bug, be sure to include OS/browser version and steps/code to reproduce the bug, a [JSFiddle](http://jsfiddle.net/) would be great.
####Development
If you want ot contribute to arrive, here is the workflow you should use:
#### Development
If you want to contribute to arrive, here is the workflow you should use:

@@ -134,0 +140,0 @@ 1. Fork the repository.

@@ -0,10 +1,13 @@

/*globals jQuery,Window,HTMLElement,HTMLDocument,HTMLCollection,NodeList,MutationObserver */
/*exported Arrive*/
/*jshint latedef:false */
/*
* arrive.js
* v2.3.1
* v2.4.1
* https://github.com/uzairfarooq/arrive
* MIT licensed
*
* Copyright (c) 2014-2016 Uzair Farooq
* Copyright (c) 2014-2017 Uzair Farooq
*/
var Arrive = (function(window, $, undefined) {

@@ -27,3 +30,3 @@

return elem instanceof HTMLElement && matches.call(elem, selector);
},
},
// to enable function overloading - By John Resig (MIT Licensed)

@@ -33,12 +36,27 @@ addMethod: function (object, name, fn) {

object[ name ] = function(){
if ( fn.length == arguments.length )
if ( fn.length == arguments.length ) {
return fn.apply( this, arguments );
else if ( typeof old == 'function' )
}
else if ( typeof old == 'function' ) {
return old.apply( this, arguments );
}
};
},
callCallbacks: function(callbacksToBeCalled) {
for (var i = 0, cb; cb = callbacksToBeCalled[i]; i++) {
cb.callback.call(cb.elem);
callCallbacks: function(callbacksToBeCalled, registrationData) {
if (registrationData && registrationData.options.onceOnly && registrationData.firedElems.length == 1) {
// as onlyOnce param is true, make sure we fire the event for only one item
callbacksToBeCalled = [callbacksToBeCalled[0]];
}
for (var i = 0, cb; (cb = callbacksToBeCalled[i]); i++) {
if (cb && cb.callback) {
cb.callback.call(cb.elem, cb.elem);
}
}
if (registrationData && registrationData.options.onceOnly && registrationData.firedElems.length == 1) {
// unbind event after first callback as onceOnly is true.
registrationData.me.unbindEventWithSelectorAndCallback.call(
registrationData.target, registrationData.selector, registrationData.callback);
}
},

@@ -48,3 +66,3 @@ // traverse through all descendants of a node to check if event should be fired for any descendant

// check each new node if it matches the selector
for (var i=0, node; node = nodes[i]; i++) {
for (var i=0, node; (node = nodes[i]); i++) {
if (matchFunc(node, registrationData, callbacksToBeCalled)) {

@@ -64,6 +82,10 @@ callbacksToBeCalled.push({ callback: registrationData.callback, elem: node });

for (attrName in firstArr) {
options[attrName] = firstArr[attrName];
if (firstArr.hasOwnProperty(attrName)) {
options[attrName] = firstArr[attrName];
}
}
for (attrName in secondArr) {
options[attrName] = secondArr[attrName];
if (secondArr.hasOwnProperty(attrName)) {
options[attrName] = secondArr[attrName];
}
}

@@ -98,6 +120,6 @@ return options;

var newEvent = {
target: target,
selector: selector,
options: options,
callback: callback,
target: target,
selector: selector,
options: options,
callback: callback,
firedElems: []

@@ -109,3 +131,3 @@ };

}
this._eventsBucket.push(newEvent);

@@ -116,3 +138,3 @@ return newEvent;

EventsBucket.prototype.removeEvent = function(compareFunction) {
for (var i=this._eventsBucket.length - 1, registeredEvent; registeredEvent = this._eventsBucket[i]; i--) {
for (var i=this._eventsBucket.length - 1, registeredEvent; (registeredEvent = this._eventsBucket[i]); i--) {
if (compareFunction(registeredEvent)) {

@@ -122,3 +144,8 @@ if (this._beforeRemoving) {

}
this._eventsBucket.splice(i, 1);
// mark callback as null so that even if an event mutation was already triggered it does not call callback
var removedEvents = this._eventsBucket.splice(i, 1);
if (removedEvents && removedEvents.length) {
removedEvents[0].callback = null;
}
}

@@ -145,3 +172,3 @@ }

var MutationEvents = function(getObserverConfig, onMutation) {
var eventsBucket = new EventsBucket(),
var eventsBucket = new EventsBucket(),
me = this;

@@ -155,11 +182,10 @@

eventsBucket.beforeAdding(function(registrationData) {
var
target = registrationData.target,
selector = registrationData.selector,
callback = registrationData.callback,
var
target = registrationData.target,
observer;
// mutation observer does not work on window or document
if (target === window.document || target === window)
if (target === window.document || target === window) {
target = document.getElementsByTagName("html")[0];
}

@@ -172,3 +198,3 @@ // Create an observer instance

var config = getObserverConfig(registrationData.options);
observer.observe(target, config);

@@ -209,3 +235,3 @@

var elements = utils.toElementsArray(this),
callback = selector,
callback = selector,
compareFunction;

@@ -257,5 +283,2 @@

var ArriveEvents = function() {
var mutationEvents,
me = this;
// Default options for 'arrive' event

@@ -286,3 +309,4 @@ var arriveDefaultOptions = {

targetNode = mutation.target,
callbacksToBeCalled = [];
callbacksToBeCalled = [],
node;

@@ -295,7 +319,7 @@ // If new nodes are added

if (nodeMatchFunc(targetNode, registrationData, callbacksToBeCalled)) {
callbacksToBeCalled.push({ callback: registrationData.callback, elem: node });
callbacksToBeCalled.push({ callback: registrationData.callback, elem: targetNode });
}
}
utils.callCallbacks(callbacksToBeCalled);
utils.callCallbacks(callbacksToBeCalled, registrationData);
});

@@ -312,18 +336,9 @@ }

if (registrationData.firedElems.indexOf(node._id) == -1) {
registrationData.firedElems.push(node._id);
if (registrationData.options.onceOnly) {
if (registrationData.firedElems.length === 0) {
// On first callback, unbind event.
registrationData.me.unbindEventWithSelectorAndCallback.call(
registrationData.target, registrationData.selector, registrationData.callback);
} else {
// Ignore multiple mutations which may have been queued before the event was unbound.
return;
}
}
registrationData.firedElems.push(node._id);
callbacksToBeCalled.push({ callback: registrationData.callback, elem: node });
return true;
}
}
return false;
}

@@ -359,3 +374,3 @@

if (options.onceOnly && existing.length) {
return callback.call(existing[0].elem);
return callback.call(existing[0].elem, existing[0].elem);
}

@@ -378,9 +393,6 @@

var LeaveEvents = function() {
var mutationEvents,
me = this;
// Default options for 'leave' event
var leaveDefaultOptions = {};
function getLeaveObserverConfig(options) {
function getLeaveObserverConfig() {
var config = {

@@ -397,3 +409,2 @@ childList: true,

var removedNodes = mutation.removedNodes,
targetNode = mutation.target,
callbacksToBeCalled = [];

@@ -405,3 +416,3 @@

utils.callCallbacks(callbacksToBeCalled);
utils.callCallbacks(callbacksToBeCalled, registrationData);
});

@@ -470,2 +481,2 @@ }

})(window, typeof jQuery === 'undefined' ? null : jQuery, undefined);
})(window, typeof jQuery === 'undefined' ? null : jQuery, undefined);

@@ -123,3 +123,3 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 500;

var eventFired,
selector = ".test-elem";
selector = ".test-elem",
callback = function() {

@@ -174,2 +174,19 @@ eventFired = true;

});
it("arrive event should not be fired once unbind is called from within arrive callback", function(done) {
var callbackCount = 0;
j(document).arrive(".some-class", { existing: true }, function () {
document.unbindArrive(".some-class");
callbackCount++;
});
$("body").append($("<div class='some-class'></div>"));
$("body").append($("<div class='some-class'></div>"));
setTimeout(function() {
expect(callbackCount).toBe(1);
done();
}, 400);
});
});

@@ -197,3 +214,3 @@

it("onceOnly argument prevents multiple callbacks for a single registration", function(done) {
it("onceOnly argument should result in callback being called only once", function(done) {
var callCount = 0;

@@ -309,2 +326,23 @@

});
describe("ES2015 arrow function support", function() {
var selector = ".test-elem";
it("Make sure the first argument equals `this` object", function(done) {
var $appendedElem = $("<div class='test-elem'></div>");
j(document).arrive(selector, function(elem) {
expect(this).toBe(elem);
done();
});
$("body").append($appendedElem);
});
it("Make sure the first argument equals `this` object with `options.onceOnly` and `options.existing`", function(done) {
j(document).arrive(selector, {onceOnly: true, existing: true}, function(elem) {
expect(this).toBe(elem);
done();
$(selector).remove();
});
});
});
});

@@ -0,0 +0,0 @@ function getParameterByName(name) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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