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

@actyx-contrib/registry

v3.0.0

Published

Want to keep track of and work with all fish of a specific type? Meet the RegistryFish pattern.

Downloads

45

Readme

Registry toolkit

Want to keep track of and work with all fish of a specific type? Meet the RegistryFish pattern.

scalable, reuseable, composable, and maintainable

One thing that has come up quite a few times is the need to track all fish of a certain kind in someplace. You may have a fish representing a specific entity on your shop-floor. There are going to be many instances of this fish, one for each entity. Now, what if you wanted to show a list of all these entities somewhere?

The registry pattern will lead you to a data model that is scalable, reuseable, composable, and maintainable.

Read more about it in the blog post.

📦 Installation

Registry toolkit is available as an npm package.

npm install @actyx-contrib/registry

📖 Example / Micro tutorials

This library is made to reduce the code you write.

Using Callbacks:

import { observeRegistry } from '@actyx-contrib/registry'
import { ChatRoomRegistryFish, ChatFish } from "./fish/chatFish"
import { Pond } from '@actyx/pond'

Pond.default().then(pond => {
  observeRegistry(pond, MachineFish.registry, Object.keys, MachineFish.of, states => console.log(states))
})

using RxJS:

import { observeRegistry$ } from '@actyx-contrib/registry'
import { ChatRoomRegistryFish, ChatFish } from "./fish/chatFish"
import { RxPond } from '@actyx-contrib/rx-pond'

RxPond.default().then(rxPond => {
  observeRegistry$(pond, MachineFish.registry, Object.keys, MachineFish.of)
    .subscribe(states => console.log(states))
})

You will find detailed examples here

You can access the full api documentation and related examples by visiting:

https://actyx-contrib.github.io/registry

🤓 Developer tools

| Script | Description | |---|---| | npm run clean | Clean lib and coverage folders | | npm run tsc | Run TypeScript check | | npm run tsc:watch | Run TypeScript check watch mode | | npm run build | Build project | | npm run build:watch | Build project watch mode | | npm run lint | Check for lint issues | | npm run lint:fix | Check and automatically fix lint issues | | npm run test | Run Jest tests | | npm run test:no-coverage | Run Jest tests and exclude coverage report | | npm run license:add | Append license information to every relevant files | | npm run license:check | Check if license information is present on every relevant files | | npm run license:check-dep | Check the licenses for project dependencies and produce a summary |