npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@asmtechno/iqlib

v1.0.8

Published

The Israel Queue implementation

Downloads

89

Readme

Introduction

The Israeli queue data structure is based on grouping and prioritizing items based on "friendship". Here's how it works.

Defining simple priority queues the idea behind priority queues is quite simple: you have a set of items/tasks that need to be completed, and you can pull one item at a time. When you insert elements into a priority queue, you assign a priority to each element. When retrieving these elements (removing them from the queue), the element with the highest priority at that time will be removed from the queue. Here's an example of a first-in, first-out (FIFO) queue (time-in priority).

This is a simple idea of priority queues, which we will try to improve with the help of Israeli queues.

Grouping - Let's introduce a new concept - friendship between elements in the queue. Objects can be friends if they are somehow connected and if it makes sense to do them together.

Imagine that you need to organize your order delivery business so that at the time of dispatch, several machines group orders according to a certain criterion, for example, by address and size of the order, or orders that are about to spoil, etc.

  1. Groups. Instead of containing only elements, the queue will contain groups of elements. Groups can contain one or more elements, but cannot be empty. They may be organized in order (by priority) or not. The group will contain only those queue elements that are related by a certain criterion (they are friends).

  2. Queuing. When we queue a new element, we iterate through all the groups in the queue. If the element being added to the queue is friends with an element in any group (friendship is a transitive relationship, so if it is friends with one, it is friends with everyone), the element will be added to the group and its priority will change, be added to the group's priority (the priority of a group is equal to the sum of its members).

Installation 📦

npm install @asmtechno/iqlib

How to use

israel-queue-server

reference Github:

service-lib