index.js
function isExpired (key) {
  const expireKey = `${expire}${key}`
  return storage
    .get(expireKey)
    .then(time => Promise.resolve(Date.now() >= new Date(time).getTime(), time))
}
function isExpired (key) {
  const expireKey = `${expire}${key}`
  return storage
    .get(expireKey)
    .then(time => Promise.resolve(Date.now() >= new Date(time).getTime(), time))
}
function isExpired ( key ) { const expireKey = ` ${ expire } ${ key } ` return storage . get ( expireKey ) . then ( time => Promise . resolve ( Date . now ( ) >= new Date ( time ) . getTime ( ) , time ) ) }
Determine if cache has expired
@param {String} key
Determine if cache has expired