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

qj

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qj - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

43

lib/qj.js

@@ -5,5 +5,12 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),(f.qj||(f.qj={})).js=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

QJ = function(selector) {
if (QJ.isDOMElement(selector)) {
return selector;
}
return document.querySelectorAll(selector);
};
QJ.isDOMElement = function(el) {
return el && (el.nodeName != null);
};
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;

@@ -57,3 +64,4 @@

},
originalEvent: original
originalEvent: original,
data: original.data || original.detail
};

@@ -67,3 +75,18 @@ if (e.which == null) {

QJ.on = function(element, eventName, callback) {
var originalCallback;
var el, multEventName, originalCallback, _i, _j, _len, _len1, _ref;
if (element.length) {
for (_i = 0, _len = element.length; _i < _len; _i++) {
el = element[_i];
QJ.on(el, eventName, callback);
return;
}
}
if (eventName.match(" ")) {
_ref = eventName.split(" ");
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
multEventName = _ref[_j];
QJ.on(element, multEventName, callback);
return;
}
}
originalCallback = callback;

@@ -105,2 +128,11 @@ callback = function(e) {

QJ.hasClass = function(el, className) {
var e, hasClass, _i, _len;
if (el.length) {
hasClass = true;
for (_i = 0, _len = el.length; _i < _len; _i++) {
e = el[_i];
hasClass = hasClass && QJ.hasClass(e, className);
}
return hasClass;
}
if (el.classList) {

@@ -162,8 +194,9 @@ return el.classList.contains(className);

QJ.trigger = function(el, name, data) {
var ev;
if (window.CustomEvent) {
var e, ev;
try {
ev = new CustomEvent(name, {
detail: data
});
} else {
} catch (_error) {
e = _error;
ev = document.createEvent('CustomEvent');

@@ -170,0 +203,0 @@ if (ev.initCustomEvent) {

2

package.json
{
"name": "qj",
"version": "0.0.3",
"version": "0.0.4",
"description": "A minimal jQuery replacement used in Card and Payment.",

@@ -5,0 +5,0 @@ "keywords": [],

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

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