-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add matches and nested APIs #119
base: main
Are you sure you want to change the base?
Conversation
This looks great! 👏 I also like the included Looks like the bundlesize just needs to be updated to get CI green. I wonder if it's possible to feed that bundle size data into the website, i.e. "Fast 1.48kb functional library for creating Finite State Machines" |
@matthewp is there some additional work you would like to implement on this branch or is it able to be merged in? If you'd like this merged, I'd be happy to address the conflicts and get it ready for review. |
@gkiely feel free to update the branch. I would like to take another look before we release it though. This might make a good 1.0 feature. |
This PR also needs docs before merging. And a changeset. |
@matthewp I would have added |
I probably would break it up too. I actually think I feel better about |
This PR adds the following APIs:
<service>.matches(<string>)
Returns
true
when the<service>
is in the state named<string>
, which includes nested states separated by dots ('.'); e.g.foo.bar
indicates statefoo
in the toplevel machine andbar
in the current child machine.nested()
Creates a state, similar to
state
,immediate
andinvoke
; this state executes a child state machineCloses #56