Skip to content

Commit

Permalink
fix(types): allow passing undefined filename (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jun 12, 2020
1 parent 8ce40e9 commit 9136f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jiti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function md5 (content: string, len = 8) {
return createHash('md5').update(content).digest('hex').substr(0, len)
}

export default function createJITI (_filename: string = process.cwd(), opts: JITIOptions): NodeRequire {
export default function createJITI (_filename: string = process.cwd(), opts: JITIOptions = {}): NodeRequire {
opts = { ...defaults, ...opts }

if (opts.cache && !opts.cacheDir) {
Expand Down

0 comments on commit 9136f15

Please sign in to comment.