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

@neocodemirror/svelte

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neocodemirror/svelte - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

23

./dist/index.js

@@ -217,21 +217,22 @@ import { defaultKeymap, indentWithTab } from '@codemirror/commands';

function throttle(func, threshold) {
let lastArgs;
let shouldWait = false;
function timeoutFunction(self) {
if (lastArgs) {
func.apply(self, lastArgs);
setTimeout(timeoutFunction, threshold, self);
let last_args;
let should_wait = false;
function timeout_function(self) {
if (last_args) {
func.apply(self, last_args);
setTimeout(timeout_function, threshold, self);
last_args = null;
return;
}
shouldWait = false;
should_wait = false;
}
return function throttled(...args) {
const self = this;
if (shouldWait) {
lastArgs = args;
if (should_wait) {
last_args = args;
return;
}
func.apply(self, args);
shouldWait = true;
setTimeout(timeoutFunction, threshold, self);
should_wait = true;
setTimeout(timeout_function, threshold, self);
};

@@ -238,0 +239,0 @@ }

@@ -217,21 +217,22 @@ import { defaultKeymap, indentWithTab } from '@codemirror/commands';

function throttle(func, threshold) {
let lastArgs;
let shouldWait = false;
function timeoutFunction(self) {
if (lastArgs) {
func.apply(self, lastArgs);
setTimeout(timeoutFunction, threshold, self);
let last_args;
let should_wait = false;
function timeout_function(self) {
if (last_args) {
func.apply(self, last_args);
setTimeout(timeout_function, threshold, self);
last_args = null;
return;
}
shouldWait = false;
should_wait = false;
}
return function throttled(...args) {
const self = this;
if (shouldWait) {
lastArgs = args;
if (should_wait) {
last_args = args;
return;
}
func.apply(self, args);
shouldWait = true;
setTimeout(timeoutFunction, threshold, self);
should_wait = true;
setTimeout(timeout_function, threshold, self);
};

@@ -238,0 +239,0 @@ }

{
"name": "@neocodemirror/svelte",
"version": "0.0.12",
"version": "0.0.13",
"description": "Svelte Action to add codemirro to your apps 😉",

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

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