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

@cniot/flow

v2.0.1

Published

让串行的业务流程编码逻辑更清晰。 文档参考: https://yuque.antfin.com/docs/share/4296d3bb-80d4-4f8e-9736-7cf5734590f5

Downloads

10

Readme

Flow

让串行的业务流程编码逻辑更清晰。 文档参考: https://yuque.antfin.com/docs/share/4296d3bb-80d4-4f8e-9736-7cf5734590f5

实例

  • page

const flow = new Flow()
flow.push(function(data, flow){
  // data = {a:1}
  return flow.next({a:2})
})

flow.push(function(data, flow){
  // data = {a: 2}
  return flow.getFirstFrame({});
})

await flow.start({a:1})

API


cosnt flow = new Flow();
flow.push(async function)
flow.next(data)
flow.back(data)
flow.backTo("key", data);
flow.replay(data);
flow.replace("key", data);
flow.restart({})
flow.start()

更新日志

2.0.0

  • fix: flow.back 回跳的时候,无法带回最新的数据问题。flow.back({a:1}) 可以正确传值了。
  • 为了避免影响已上线的业务,这里做大版本升级

1.0.4

  • feat: 页面支持 onCallback

1.0.3

  • feat webservice 开启 debug 以后可以查看 onNext 的入参

1.0.2

  • fix router 渲染参数 action 丢失

1.0.1

  • WebService io 模拟

1.0.0

  • 对 router 渲染的页面获取当前状态进行了更新,isActive 去掉,使用 hasActive() 代替

0.4.0

  • 新增了 webflow 支持

0.3.6

  • fix: startApp 注册路径错误

0.3.5

  • 支持通过 tr 函数获取国际化文案
  • 新增 /web/system/setLocaleMessage, /web/system/setLocale 设置国际化
  • new GriffenService 新增 locale 参数,初始化国际化
  • 新增 导出模块 i18n
  • fix: logic 模块找不到的时候不报错

0.3.4

  • 支持 onCallback 直接调用 gs 的方法

0.3.3

  • 去掉了自动发送监控数据,修改为抛出事件 page.didmount, page.unmount, page.update 3 个事件抛出

0.3.1

  • getPage 方法,判断当前页面不存在返回 showErrorPage 定义的页面

0.3.0

  • 修改 pageFlow 的初始化方法,让客户拥有更多 react 的自定义空间
  • 重构了 GriffenService 类

0.2.4

  • 支持 arms 埋点,并且自动收集 页面渲染性能数据

0.2.2

  • 推荐使用 onNext 方法,而不是 service.onNext 方法
  • service 新增 .activeAction 当前正在激活状态的 action 快捷访问
  • Logic render not found 文案