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

@elvia/elvis-toolbox

Package Overview
Dependencies
Maintainers
7
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 3.0.0 to 4.0.0

15

CHANGELOG.json

@@ -5,2 +5,17 @@ {

{
"date": "28.09.22",
"version": "4.0.0",
"changelog": [
{
"type": "breaking_changes",
"changes": [
"Remove function <span class=\"code-text\">throttle</span>, as it is only a re-export of <span class=\"code-text\">lodash.throttle</span>"
],
"fixes": [
"Add <span class=\"code-text\">lodash.throttle</span> as a dependency and use method <span class=\"code-text\">throttle()</span> directly."
]
}
]
},
{
"date": "15.09.22",

@@ -7,0 +22,0 @@ "version": "3.0.0",

12

dist/elvis-toolbox.d.ts
/**
* Uses lodash throttle function: https://lodash.com/docs/4.17.15#throttle
*
* @param func — The function to throttle.
* @param limit — The number of milliseconds to throttle invocations to.
* @param options — The options object.
* @param options.trailing — Specify invoking on the trailing edge of the timeout.
* @returns Returns the new throttled function.
*/
export declare const throttle: (func: () => void, limit: number, options?: {
trailing: boolean;
}) => any;
/**
* Starts a listener for mousedown and keydown keyboard events and adds or removes the outline of the element in focus.

@@ -15,0 +3,0 @@ * @param element The element that should be able to obtain an outline.

16

dist/elvis-toolbox.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.warnDeprecatedProps = exports.outlineListener = exports.throttle = void 0;
const lodash_1 = require("lodash");
exports.warnDeprecatedProps = exports.outlineListener = void 0;
/**
* Uses lodash throttle function: https://lodash.com/docs/4.17.15#throttle
*
* @param func — The function to throttle.
* @param limit — The number of milliseconds to throttle invocations to.
* @param options — The options object.
* @param options.trailing — Specify invoking on the trailing edge of the timeout.
* @returns Returns the new throttled function.
*/
const throttle = (func, limit, options) => {
return (0, lodash_1.throttle)(func, limit, options);
};
exports.throttle = throttle;
/**
* Starts a listener for mousedown and keydown keyboard events and adds or removes the outline of the element in focus.

@@ -20,0 +6,0 @@ * @param element The element that should be able to obtain an outline.

{
"name": "@elvia/elvis-toolbox",
"version": "3.0.0",
"version": "4.0.0",
"description": "",
"license": "MIT",
"author": "",
"main": "./dist/index.js",
"dependencies": {
"lodash": "^4.17.21"
},
"devDependencies": {
"@types/lodash": "^4.14.179"
}
"main": "./dist/index.js"
}
# Toolbox
## Throttle
Basic throttle functionality
`import { throttle } from @elvia/elvis-toolbox;`
`throttle(func, limit)`

@@ -1,17 +0,2 @@

import { throttle as lodashThrottle } from 'lodash';
/**
* Uses lodash throttle function: https://lodash.com/docs/4.17.15#throttle
*
* @param func — The function to throttle.
* @param limit — The number of milliseconds to throttle invocations to.
* @param options — The options object.
* @param options.trailing — Specify invoking on the trailing edge of the timeout.
* @returns Returns the new throttled function.
*/
export const throttle = (func: () => void, limit: number, options?: { trailing: boolean }): any => {
return lodashThrottle(func, limit, options);
};
/**
* Starts a listener for mousedown and keydown keyboard events and adds or removes the outline of the element in focus.

@@ -18,0 +3,0 @@ * @param element The element that should be able to obtain an outline.

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