mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +00:00
add stylelint
This commit is contained in:
parent
47a2e5694e
commit
928c9cf07c
83 changed files with 10807 additions and 1770 deletions
8
packages/roleypoly-server/util/areduce.js
Normal file
8
packages/roleypoly-server/util/areduce.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
// @flow
|
||||
export default async function<T, V> (array: Array<T>, predicate: (Array<V>, T) => Promise<Array<V>>, acc: Array<V>): Promise<Array<V>> {
|
||||
for (let i of array) {
|
||||
acc = await predicate(acc, i)
|
||||
}
|
||||
|
||||
return acc
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue