Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

Commit 7e24107

Browse files
committed
feat: export hash function from sharding
1 parent 27372ff commit 7e24107

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/importer/dir-sharded.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const onEnd = require('pull-stream/sinks/on-end')
1616
const asyncMap = require('pull-stream/throughs/async-map')
1717
const Bucket = require('hamt-sharding')
1818

19-
const hashFn = function (value, callback) {
19+
const hashFn = function (value) {
2020
return new Promise((resolve, reject) => {
2121
multihashing(value, 'murmur3-128', (err, hash) => {
2222
if (err) {
@@ -110,6 +110,7 @@ class DirSharded extends Dir {
110110
}
111111

112112
module.exports = createDirSharded
113+
module.exports.hashFn = hashFn
113114

114115
function createDirSharded (props, _options) {
115116
return new DirSharded(props, _options)

0 commit comments

Comments
 (0)