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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@haku-sci/utils

v2.5.4

Published

utils from haku-sci. Library only

Downloads

482

Readme

Description of the utils inside this package

This package is used by Haku-Sci, to handle different contents.

Microservices

Loading the class MicroserviceLib, it allows to fetch:

  • The name of the current microservice
  • default bootstrap for microservices

Consul

if consul is used, and env variabe CONSUL_URI is defined, then the lib allows as well:

  • to send messages to other services via TCP, and fetch the response if any
  • to emit message for all services via RabbitMQ

Docker

the start_services.bat method allows to run all required services from docker:

  • Consul
  • Neo4j
  • Postgresql
  • RabbitMQ

PostgreSQL

if the service uses a database PostgreSQL, and this database doesn't exist in the system, it will be created automatically (require the librarie pg)

RabbitMQ

Using RabbitMQService, lets implement dispatch of messages with an option to wait that all messages have been processed. A watchdog of 10 seconds raise an error Gateway timeout If the option is activated, a queue ack_queue_<name of the microservice> is created

The decorator HakuSciSubscriber allows to listen for a specific keyword. Each microservice which register with this decorator will have automatically a queue created, with its name. The exchanger is amq.topic

launch.json

The launch.json file allows to run all services (the microservice libs must be in the same directory as "services", which contains all services)

utils

executeFunction

lets call dynamically the function of an object, with parameters (Format: object as class, function name as string, parameters as dictionary)

getSortedParameters

for a function, get available parameters as dictionary, and return a list of parameters in correct order, to be run for this function (...args)

withWatchdog

Add a watchdog to a promise