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

@elvia/elvis-toolbox

Package Overview
Dependencies
Maintainers
6
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elvia/elvis-toolbox - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

dist/elvis-toolbox.d.ts

74

dist/elvis-toolbox.js

@@ -1,47 +0,35 @@

/*
* THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN.
* DO NOT MAKE CHANGES TO THIS FILE DIRECTLY
*/
import * as lodashThrottle from 'lodash.throttle';
const throttle = (func, limit, options) => {
return lodashThrottle(func, limit, options);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = require("lodash");
var customThrottle = function (func, limit, options) {
return (0, lodash_1.throttle)(func, limit, options);
};
const outlineListener = (element, destroy) => {
if (!element) {
return;
}
const addOutline = e => {
if (e.key === 'Tab' && element.classList.contains('ewc-no-outline')) {
element.classList.remove('ewc-no-outline'); // Add mousedown event-listener to remove outline again
element.addEventListener('mousedown', removeOutline, false);
var outlineListener = function (element, destroy) {
if (!element) {
return;
}
};
const removeOutline = () => {
if (!element.classList.contains('ewc-no-outline')) {
element.classList.add('ewc-no-outline'); // Remove mousedown event-listener until next tab happens
element.removeEventListener('mousedown', removeOutline, false);
var addOutline = function (e) {
if (e.key === 'Tab' && element.classList.contains('ewc-no-outline')) {
element.classList.remove('ewc-no-outline');
// Add mousedown event-listener to remove outline again
element.addEventListener('mousedown', removeOutline, false);
}
};
var removeOutline = function () {
if (!element.classList.contains('ewc-no-outline')) {
element.classList.add('ewc-no-outline');
// Remove mousedown event-listener until next tab happens
element.removeEventListener('mousedown', removeOutline, false);
}
};
// If destroy is true -> Remove all listeners and return
if (destroy) {
element.removeEventListener('keydown', addOutline);
element.removeEventListener('mousedown', removeOutline, false);
return;
}
}; // If destroy is true -> Remove all listeners and return
if (destroy) {
element.removeEventListener('keydown', addOutline);
element.removeEventListener('mousedown', removeOutline, false);
return;
} // Start listening for keyboard-events and mousedown on element to add or remove outline
element.addEventListener('keydown', addOutline);
element.addEventListener('mousedown', removeOutline, false);
// Start listening for keyboard-events and mousedown on element to add or remove outline
element.addEventListener('keydown', addOutline);
element.addEventListener('mousedown', removeOutline, false);
};
export default {
throttle: throttle,
outlineListener: outlineListener
};
exports.default = { throttle: customThrottle, outlineListener: outlineListener };
{
"name": "@elvia/elvis-toolbox",
"version": "1.2.0",
"version": "1.2.1",
"description": "",
"license": "MIT",
"author": "",
"main": "./dist/elvis-toolbox.js",
"author": "",
"license": "MIT",
"dependencies": {
"lodash.throttle": "^4.1.1"
},
"devDependencies": {
"@types/lodash.throttle": "^4.1.6"
}
}

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

import * as lodashThrottle from 'lodash.throttle';
import { throttle } from 'lodash';
const throttle = (func: () => void, limit: number, options: { trailing: boolean }): void => {
return lodashThrottle(func, limit, options);
const customThrottle = (func: () => void, limit: number, options?: { trailing: boolean }): any => {
return throttle(func, limit, options);
};
const outlineListener = (element: HTMLElement, destroy?: boolean): void => {
const outlineListener = (element: HTMLElement | null, destroy?: boolean): void => {
if (!element) {

@@ -40,2 +40,2 @@ return;

export default { throttle: throttle, outlineListener: outlineListener };
export default { throttle: customThrottle, outlineListener: outlineListener };
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