
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
ds-kit is an NPM package provide ready to use famous data structures to JavaScript. It draws inspiration from the structured beauty of C++ STL.
npm install ds-js-stl
The Library provides ready to use famous data structures to JavaScript. It draws inspiration from the structured beauty of C++ STL.
import { Stack, Queue, PriorityQueue, DoubleLinkedList, LinkedList, Deque } from 'ds-kit';
const stack = new Stack();
stack.push(32);
stack.pop();
console.log(stack.top());
console.log(stack.size());
console.log(stack.isEmpty());
const queue = new Queue();
queue.enqueue(32);
console.log(queue.dequeue());
console.log(queue.isEmpty());
console.log(queue.size());
console.log(queue.front());
console.log(queue.back());
const deque = new Deque();
deque.push_back(32);
deque.push_front(33);
console.log(deque.pop_front());
console.log(deque.pop_back());
console.log(deque.size());
console.log(deque.isEmpty());
const linkedList = new LinkedList();
linkedList.insert(32);
linkedList.display();
console.log(linkedList.size());
console.log(linkedList.isEmpty());
const headLinkedList = linkedList.head();
const doubleLinkedList = new DoubleLinkedList();
doubleLinkedList.insert(32);
doubleLinkedList.display();
console.log(doubleLinkedList.size());
console.log(doubleLinkedList.isEmpty());
const headLinkedList = doubleLinkedList.head();
const tailLinkedList = doubleLinkedList.tail();
// For MaxHeap
const priorityQueue = new PriorityQueue();
priorityQueue.insert(32);
console.log(priorityQueue.remove());
console.log(priorityQueue.peek());
//For MinHeap
const minPriorityQueue = new PriorityQueue("minHeap");
priorityQueue.insert(32);
console.log(priorityQueue.remove());
console.log(priorityQueue.peek());
Abhishek Adarsh Mishra
FAQs
ds-kit is an NPM package provide ready to use famous data structures to JavaScript. It draws inspiration from the structured beauty of C++ STL.
We found that ds-js-stl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.