lazy-collections:收集快速和懒惰的操作

时间:2024-05-19 13:57:17
【文件属性】:

文件名称:lazy-collections:收集快速和懒惰的操作

文件大小:142KB

文件格式:ZIP

更新时间:2024-05-19 13:57:17

javascript functional-programming lazy lazy-collections TypeScript

懒惰的收藏 快速懒惰的收集操作。 用类似的方法工作.map() .filter()和.reduce()是好的,但他们创造新的阵列,一切都才去下一步急切地完成。 这就是惰性收集的来源,我们在后台使用了和异步迭代器,以便您的数据像流一样流动以具有最佳速度。 所有功能都应与iterator和asyncIterator ,如果其中一个功能使用asyncIterator (例如,当您引入delay(100) ),请不要忘记await结果! const program = pipe ( map ( x => x * 2 ) , filter ( x => x % 4 === 0 ) , filter ( x => x 0 === 0 ) , filter ( x => x @0 === 0 ) , toArray ( ) ) ; program ( range


【文件预览】:
lazy-collections-master
----.nvmrc(7B)
----package.json(1KB)
----.github()
--------workflows()
----LICENSE(1KB)
----src()
--------reduce.ts(689B)
--------zip.test.ts(2KB)
--------take.test.ts(685B)
--------chunk.ts(2KB)
--------find.ts(729B)
--------reverse.test.ts(910B)
--------head.ts(602B)
--------slice.ts(1KB)
--------skip.test.ts(1KB)
--------pipe.ts(347B)
--------sum.ts(117B)
--------delay.ts(417B)
--------groupBy.ts(974B)
--------some.test.ts(2KB)
--------where.ts(297B)
--------findIndex.ts(721B)
--------range.ts(464B)
--------reduce.test.ts(1KB)
--------map.test.ts(1KB)
--------partition.test.ts(1KB)
--------concat.test.ts(994B)
--------generate.test.ts(838B)
--------compose.ts(364B)
--------range.test.ts(1KB)
--------partition.ts(995B)
--------every.ts(717B)
--------sum.test.ts(1KB)
--------index.test.ts(681B)
--------unique.test.ts(961B)
--------pipe.test.ts(813B)
--------skip.ts(116B)
--------shared-types.ts(121B)
--------concat.ts(492B)
--------tap.ts(200B)
--------reverse.ts(1KB)
--------map.ts(760B)
--------min.ts(121B)
--------toArray.ts(260B)
--------findIndex.test.ts(2KB)
--------max.ts(122B)
--------filter.test.ts(1KB)
--------flatten.ts(2KB)
--------generate.ts(86B)
--------head.test.ts(1KB)
--------takeWhile.test.ts(1KB)
--------delay.test.ts(1KB)
--------toArray.test.ts(715B)
--------filter.ts(913B)
--------take.ts(123B)
--------where.test.ts(2KB)
--------unique.ts(793B)
--------chunk.test.ts(1KB)
--------__snapshots__()
--------some.ts(705B)
--------compact.ts(96B)
--------every.test.ts(2KB)
--------find.test.ts(2KB)
--------average.ts(652B)
--------slice.test.ts(2KB)
--------compose.test.ts(831B)
--------average.test.ts(853B)
--------tap.test.ts(1KB)
--------compact.test.ts(1KB)
--------min.test.ts(424B)
--------utils()
--------groupBy.test.ts(1KB)
--------index.ts(878B)
--------max.test.ts(426B)
--------takeWhile.ts(784B)
--------flatten.test.ts(1KB)
--------zip.ts(530B)
----tsconfig.json(722B)
----jest.setup.js(116B)
----.gitignore(76B)
----README.md(15KB)
----yarn.lock(265KB)
----scripts()
--------fix-imports.sh(213B)

网友评论