1
0
Fork 0
mirror of synced 2024-07-12 01:36:09 +12:00
budibase/packages/datastores/tests/helpers.js

9 lines
303 B
JavaScript
Raw Normal View History

2019-06-08 01:18:10 +12:00
import {map} from "lodash";
export const action = (name, run, iterator=iterateActionTimes(1)) => ({name, run, iterator});
export const iterateActionTimes = times => run =>
map([...Array(times).keys()], run);
export const iterateCollection = getCollection => run =>
2019-03-20 10:45:21 +13:00
map(getCollection(), run);