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

@svelte-put/shortcut

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svelte-put/shortcut - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

8

lib/index.js

@@ -120,5 +120,7 @@ /******************************************************************************

* @param params - svelte action parameters
* @returns svelte action interface
* @returns svelte {@link ActionReturn}
*/
function shortcut(node, params) {
var shortcut = function (node, params) {
if (!(params === null || params === void 0 ? void 0 : params.trigger))
throw new Error('@svelte-put/shortcut requires a parameter object with a `trigger` property');
var _a = params.enabled, enabled = _a === void 0 ? true : _a, trigger = params.trigger, _b = params.type, type = _b === void 0 ? 'keydown' : _b;

@@ -177,5 +179,5 @@ var handler = function (event) {

};
}
};
export { shortcut };
//# sourceMappingURL=index.js.map

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

import type { Action } from 'svelte/action';
import type { ShortcutParameters, ShortcutAttributes } from './types';
declare global {
export namespace svelteHTML {
interface HTMLAttributes extends ShortcutAttributes {
}
}
}
/**

@@ -101,8 +96,5 @@ * Listen for keyboard event and trigger `shortcut` {@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent | CustomEvent }

* @param params - svelte action parameters
* @returns svelte action interface
* @returns svelte {@link ActionReturn}
*/
export declare function shortcut(node: HTMLElement, params: ShortcutParameters): {
update: (update: ShortcutParameters) => void;
destroy: () => void;
};
export declare const shortcut: Action<HTMLElement, ShortcutParameters, ShortcutAttributes>;
//# sourceMappingURL=shortcut.d.ts.map
{
"name": "@svelte-put/shortcut",
"version": "1.0.5",
"version": "1.1.0",
"description": "Action to move node on mousedown & mousemove",

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

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