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

ixixx

v2.2.2

Published

This library implements trix text indexing file generation. Trix indexes allow you to search a large amount of free text data using static files and byte-range requests, no server side code needed

Downloads

982

Readme

Build Status

ixixx-js

This library implements trix text indexing file generation. Trix indexes allow you to search a large amount of free text data using static files and byte-range requests, no server side code needed

It is basically a translation of https://github.com/ucscGenomeBrowser/kent/blob/master/src/index/ixIxx/ixIxx.c from C into JS, plus some added code to keep memory usage low by doing an external disk based sort. The original C library basically loads all keywords into memory, and sorts the keys of a large hash, but this library ran into some node.js limits on doing this with larger files and so it uses the external sort to keep memory usage lower

CLI

npm install -g ixixx
ixixxjs yourfile.text [out.ix] [out.ixx]

Internal API

ixIxxStream(stream: Readable, outIxFilename: string, outIxxFilename:string)
ixIxx(inFilename:string,outIxFilename:string,outIxxFilename:string)

The trix concept

Takes an input file like this, containing a mapping of a keyword to several keywords e.g.

MyGene0001  kinase signalling
MyGene0002  binding zinc

And then crates a new file thats kind of like the inverse of it in an ix file

binding MyGene0002
kinase MyGene0001
signalling MyGene0001
zinc MyGene0002

And indexes it so that it has a prefix, and a byte offset to words starting with that prefix in an ixx file e.g. (made up numbers but conceptually something like this)

bindin0000000000
signal0000000114

So that when you type e.g. sig it can lookup where approximately you want to start looking in the ixx file and then perform byte range requests against the ix file, and find that you are looking for MyGene0001

See also

https://github.com/GMOD/trix-js for the client side library to do the searches