7 lines
186 B
JavaScript
7 lines
186 B
JavaScript
|
export const normalizeProvider = (input) => {
|
||
|
if (typeof input === "function")
|
||
|
return input;
|
||
|
const promisified = Promise.resolve(input);
|
||
|
return () => promisified;
|
||
|
};
|