Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

en.js 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict'
  2. const ls = require('../ls.js')
  3. const get = require('../get.js')
  4. const put = require('../put.js')
  5. const rm = require('../rm.js')
  6. const verify = require('../verify.js')
  7. const setLocale = require('../lib/util/y.js').setLocale
  8. const clearMemoized = require('../lib/memoization.js').clearMemoized
  9. const tmp = require('../lib/util/tmp.js')
  10. setLocale('en')
  11. const x = module.exports
  12. x.ls = cache => ls(cache)
  13. x.ls.stream = cache => ls.stream(cache)
  14. x.get = (cache, key, opts) => get(cache, key, opts)
  15. x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts)
  16. x.get.sync = (cache, key, opts) => get.sync(cache, key, opts)
  17. x.get.sync.byDigest = (cache, key, opts) => get.sync.byDigest(cache, key, opts)
  18. x.get.stream = (cache, key, opts) => get.stream(cache, key, opts)
  19. x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts)
  20. x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts)
  21. x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts)
  22. x.get.info = (cache, key) => get.info(cache, key)
  23. x.get.hasContent = (cache, hash) => get.hasContent(cache, hash)
  24. x.get.hasContent.sync = (cache, hash) => get.hasContent.sync(cache, hash)
  25. x.put = (cache, key, data, opts) => put(cache, key, data, opts)
  26. x.put.stream = (cache, key, opts) => put.stream(cache, key, opts)
  27. x.rm = (cache, key) => rm.entry(cache, key)
  28. x.rm.all = cache => rm.all(cache)
  29. x.rm.entry = x.rm
  30. x.rm.content = (cache, hash) => rm.content(cache, hash)
  31. x.setLocale = lang => setLocale(lang)
  32. x.clearMemoized = () => clearMemoized()
  33. x.tmp = {}
  34. x.tmp.mkdir = (cache, opts) => tmp.mkdir(cache, opts)
  35. x.tmp.withTmp = (cache, opts, cb) => tmp.withTmp(cache, opts, cb)
  36. x.verify = (cache, opts) => verify(cache, opts)
  37. x.verify.lastRun = cache => verify.lastRun(cache)