在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):bjornbytes/RxLua开源软件地址(OpenSource Url):https://github.com/bjornbytes/RxLua开源编程语言(OpenSource Language):Lua 100.0%开源软件介绍(OpenSource Introduction):RxLuaReactive Extensions for Lua. RxLua gives Lua the power of Observables, which are data structures that represent a stream of values that arrive over time. They're very handy when dealing with events, streams of data, asynchronous requests, and concurrency. Getting StartedLuaCopy the local rx = require 'rx' You can also install RxLua using luarocks: luarocks install bjornbytes/rxlua LuvitInstall using lit install bjornbytes/rx Then require it: local rx = require 'rx' Love2DSee RxLove. Example UsageUse RxLua to construct a simple cheer: local Rx = require 'rx'
Rx.Observable.fromRange(1, 8)
:filter(function(x) return x % 2 == 0 end)
:concat(Rx.Observable.of('who do we appreciate'))
:map(function(value) return value .. '!' end)
:subscribe(print)
-- => 2! 4! 6! 8! who do we appreciate! See examples for more. ResourcesTestsUses lust. Run with:
or, to run a specific test:
LicenseMIT, see |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论