3.0.0 • Published 3 years ago

@actyx-contrib/registry v3.0.0

Weekly downloads
3
License
Apache-2.0
Repository
-
Last release
3 years ago

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

ScriptDescription
npm run cleanClean lib and coverage folders
npm run tscRun TypeScript check
npm run tsc:watchRun TypeScript check watch mode
npm run buildBuild project
npm run build:watchBuild project watch mode
npm run lintCheck for lint issues
npm run lint:fixCheck and automatically fix lint issues
npm run testRun Jest tests
npm run test:no-coverageRun Jest tests and exclude coverage report
npm run license:addAppend license information to every relevant files
npm run license:checkCheck if license information is present on every relevant files
npm run license:check-depCheck the licenses for project dependencies and produce a summary
3.0.0

3 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago