Skip to content

Commit

Permalink
chore(memoize): expose internal methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Aug 16, 2021
1 parent 974af9f commit e352625
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/memoize/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function memoize (
typeof rawStaleTtl === 'function'
? rawStaleTtl
: typeof rawStaleTtl === 'number'
? () => rawStaleTtl
: undefined
? () => rawStaleTtl
: undefined
const pending = Object.create(null)

/**
Expand Down Expand Up @@ -115,7 +115,7 @@ function memoize (

mimicFn(memoized, fn)

return Object.assign(memoized, { keyv })
return Object.assign(memoized, { keyv, ttl, staleTtl })
}

module.exports = memoize

0 comments on commit e352625

Please sign in to comment.