Commit cab74c817d6eca627e7ace39d164e880fd1b450a
pass options along, not just filename!
Dominic Tarr committed on 6/1/2019, 4:04:33 PMParent: a2172d034f077c16371a9e4f909056509aaf7816
Files changed
browser.js | changed |
index.js | changed |
browser.js | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 … | const RAF = require('random-access-web')({name: 'raw', storeName: 'raw'}) |
2 | 2 … | |
3 | -module.exports = function (filename) { | |
3 … | +module.exports = function (filename, opts) { | |
4 | 4 … | if('string' === typeof filename) { |
5 | - const raf = RAF(filename) | |
5 … | + const raf = RAF(filename, opts) | |
6 | 6 … | raf.filename = filename |
7 | 7 … | return raf |
8 | 8 … | } |
9 | 9 … | if('function' === typeof filename) throw new Error('expected a filename or a random-access-storage instance') |
index.js | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 … | const RAF = require('random-access-file') |
2 | 2 … | |
3 | -module.exports = function (filename) { | |
3 … | +module.exports = function (filename, opts) { | |
4 | 4 … | if('string' === typeof filename) { |
5 | - const raf = RAF(filename) | |
5 … | + const raf = RAF(filename, opts) | |
6 | 6 … | raf.filename = filename |
7 | 7 … | return raf |
8 | 8 … | } |
9 | 9 … | return filename |
Built with git-ssb-web