Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1566751

Browse files
committedDec 19, 2016
Improve function descriptions
1 parent 6d61c8d commit 1566751

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎src/dagnode-stream.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const streamToValue = require('./stream-to-value')
55
const getDagNode = require('./get-dagnode')
66

77
/*
8-
Transforms a stream of objects to DAGNodes and outputs them as objects.
8+
Transforms a stream of {Name, Hash} objects to include size
9+
of the DAG object.
910
1011
Usage: inputStream.pipe(DAGNodeStream({ send: send }))
1112

‎src/request-api.js

+4
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ exports = module.exports = (config) => {
152152
return requestAPI(config, options, callback)
153153
}
154154

155+
// Send a HTTP request and pass via a transform function
156+
// to convert the response data to wanted format before
157+
// returning it to the callback.
158+
// Eg. send.andTransform({}, (e) => JSON.parse(e), (err, res) => ...)
155159
send.andTransform = (options, transform, callback) => {
156160
return send(options, (err, res) => {
157161
if (err) {

0 commit comments

Comments
 (0)
This repository has been archived.