Skip to content

Instantly share code, notes, and snippets.

@Vishal-Isharani
Vishal-Isharani / historyState.ts
Created July 6, 2022 10:17
Konva js Undo/Redo History
import Konva from 'konva';
import { ShapeConfig } from 'konva/lib/Shape';
export class HistoryStat {
private static _instance: HistoryStat;
public _currentStat: any[] = [];
private _currentPointer: number = -1;
private _history: Array<Object[]> = [];
@tudorels
tudorels / gist:d0b1e79bc2dad5aa4782508d4e760af8
Created October 4, 2023 10:56 — forked from neumino/gist:6554108
Filtering nested arrays with RethinkDB
r.table("test").filter( function(doc) {
return doc("adresses").contains(function(adress) {
return adress("city").eq("Paris")
})
})
/*
{