AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻译准备中
List of type-safe and commonly used Data structures which are not provided natively by Javascript/Typescript.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A comprehensive collection of type-safe, zero-dependency data structure implementations for TypeScript/JavaScript.
Visit our comprehensive documentation site for detailed guides, API references, and examples.
• Queues: Queue, Deque, PriorityQueue
• Lists: LinkedList, DoublyLinkedList
• Heaps: BinaryHeap (MinHeap, MaxHeap)
• Trees: Trie, RedBlackTree
• Maps & Caches: SortedMap, BiDirectionalMap, LRUCache查看完整 README ↗A comprehensive collection of type-safe, zero-dependency data structure implementations for TypeScript/JavaScript.
Visit our comprehensive documentation site for detailed guides, API references, and examples.
npm:
npm install @dstoolkit/data-structures
Deno (JSR):
import { Queue, LRUCache } from 'jsr:@dstoolkit/data-structures';
import { Queue, LRUCache } from '@dstoolkit/data-structures';
// FIFO Queue
const queue = new Queue<number>();
queue.enqueue(1);
queue.enqueue(2);
console.log(queue.dequeue()); // 1
// LRU Cache
const cache = new LRUCache<string, number>({ capacity: 100 });
cache.put('key', 42);
console.log(cache.get('key')); // 42
MIT License - feel free to use this in your own projects!