mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
9 lines
166 B
JavaScript
9 lines
166 B
JavaScript
export function optional(f) {
|
|
return f == null ? null : required(f);
|
|
}
|
|
|
|
export function required(f) {
|
|
if (typeof f !== "function") throw new Error;
|
|
return f;
|
|
}
|