@karmaniverous/jeeves-scripts-core
GitHub
Preparing search index...
index
readJsonFileIfExists
Function readJsonFileIfExists
readJsonFileIfExists
<
S
extends
ZodType
<
unknown
,
unknown
,
$ZodTypeInternals
<
unknown
,
unknown
>
>
,
>
(
file
:
string
,
schema
:
S
,
fallback
:
output
<
S
>
,
)
:
output
<
S
>
Read and validate a JSON file, or return
fallback
when it doesn't exist.
Type Parameters
S
extends
ZodType
<
unknown
,
unknown
,
$ZodTypeInternals
<
unknown
,
unknown
>
>
Parameters
file
:
string
schema
:
S
fallback
:
output
<
S
>
Returns
output
<
S
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
GitHub
@karmaniverous/jeeves-scripts-core
Loading...
Read and validate a JSON file, or return
fallbackwhen it doesn't exist.