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

use-undoable

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-undoable - npm Package Compare versions

Comparing version 3.3.10 to 3.3.11

2

dist/types.d.ts
declare type ActionType = 'undo' | 'redo' | 'update' | 'reset' | 'resetInitialState';
declare type HistoryLimit = number | 'infinium' | 'infinity';
declare type MutationBehavior = 'mergePastReversed' | 'mergePast' | 'destroyFuture' | 'keep future';
declare type MutationBehavior = 'mergePastReversed' | 'mergePast' | 'destroyFuture' | 'keepFuture';
interface Action {

@@ -5,0 +5,0 @@ type: ActionType;

import type { MutationBehavior, Options } from './types';
declare const useUndoable: <T = any>(initialPresent: T, options?: Options) => [T, (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keep future" | undefined) => void, {
declare const useUndoable: <T = any>(initialPresent: T, options?: Options) => [T, (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keepFuture" | undefined, ignoreAction?: boolean | undefined) => void, {
past: T[];

@@ -11,4 +11,4 @@ future: T[];

resetInitialState: (newInitialState: T) => void;
static_setState: (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keep future" | undefined) => void;
static_setState: (payload: T, behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keepFuture" | undefined, ignoreAction?: boolean | undefined) => void;
}];
export default useUndoable;
{
"name": "use-undoable",
"version": "3.3.10",
"version": "3.3.11",
"description": "React hook for undo/redo functionality without the hassle.",

@@ -30,4 +30,4 @@ "private": false,

"npm-run-all": "^4.1.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18",
"react-dom": "^18",
"react-scripts": "^3.4.1",

@@ -34,0 +34,0 @@ "typescript": "^3.7.5"

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