10 lines
177 B
JavaScript
10 lines
177 B
JavaScript
|
export function createTypes(types = [], ns = 'annon') {
|
||
|
return types.reduce(
|
||
|
(types, action) => ({
|
||
|
...types,
|
||
|
[action]: `${ns}.${action}`
|
||
|
}),
|
||
|
{}
|
||
|
);
|
||
|
}
|