Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/cookies / src / core / clear.ts
Size: Mime:
import { config } from '../config'
import { toKeys } from './toKeys'
import { expire } from './expire'

export const clear = (forceResetAll: boolean = true) => {
  // const cache = config.get('cache')
  const cache = {}
  toKeys().forEach(key => {
    expire(key)
    // delete cache[key]
  })

  config.set('cache', cache)

  if (forceResetAll === true) {
    config.get('document').cookie = ''
  }
}