2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 633
|
|
|
|
|
// Function ID: 634
|
|
|
|
|
// Name: castFunction
|
|
|
|
|
// Dependencies: [634]
|
|
|
|
|
|
|
|
|
|
// Module 633 (castFunction)
|
2026-08-24 06:08:38 +00:00
|
|
|
import identity from "identity" /* 634 */;
|
|
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
|
2026-08-04 21:03:28 +00:00
|
|
|
export default function castFunction(fn) {
|
|
|
|
|
let tmp = fn;
|
|
|
|
|
if (typeof fn !== "function") {
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp = identity;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|