Skip to content

Commit

Permalink
reviewed API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed Apr 4, 2012
1 parent ae31fe9 commit 275c5d9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/compiler/builtins._js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
if (typeof options.parallel === "number") return options.parallel;
return options.parallel ? -1 : 1;
}
/// ## Array functions.
/// ## Array functions
///
/// These functions are asynchronous variants of the EcmaScript 5 Array functions.
///
Expand Down Expand Up @@ -276,7 +276,7 @@
}

///
/// ## Function functions.
/// ## Function functions
///
/// * `result = fn.apply_(_, thisObj, args[, index])`
/// Helper to use `Function.prototype.apply` inside streamlined functions.
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler/builtins.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Streamline built-ins

## Array functions.
## Array functions

These functions are asynchronous variants of the EcmaScript 5 Array functions.

Expand Down Expand Up @@ -41,7 +41,7 @@ Functions:
`compare` is called as `cmp = compare(_, elt1, elt2)`
Note: this function _changes_ the original array (and returns it)

## Function functions.
## Function functions

* `result = fn.apply_(_, thisObj, args[, index])`
Helper to use `Function.prototype.apply` inside streamlined functions.
Expand Down
4 changes: 2 additions & 2 deletions lib/fibers/builtins.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
if (typeof options.parallel === "number") return options.parallel;
return options.parallel ? -1 : 1;
}
/// ## Array functions.
/// ## Array functions
///
/// These functions are asynchronous variants of the EcmaScript 5 Array functions.
///
Expand Down Expand Up @@ -276,7 +276,7 @@
}, 0)

///
/// ## Function functions.
/// ## Function functions
///
/// * `result = fn.apply_(_, thisObj, args[, index])`
/// Helper to use `Function.prototype.apply` inside streamlined functions.
Expand Down
16 changes: 8 additions & 8 deletions lib/streams/server/streams._js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/// see [this blog post](http://bjouhier.wordpress.com/2011/04/25/asynchronous-episode-3-adventures-in-event-land/)
///
/// For a simple example of this API in action,
/// see the [google client example](../../../examples/streams/googleClient_.js)
/// see the [google client example](../../../examples/streams/googleClient._js)
var parseUrl = require("url").parse;
var globals = require('streamline/lib/globals');

Expand Down Expand Up @@ -356,7 +356,7 @@ function _getEncoding(headers) {
/// ## HttpServerRequest
///
/// This is a wrapper around node's `http.ServerRequest`:
/// This stream is readable (see ReadableStream above).
/// This stream is readable (see `ReadableStream` above).
///
/// * `request = new streams.HttpServerRequest(req[, options])`
/// returns a wrapper around `req`, an `http.ServerRequest` object.
Expand Down Expand Up @@ -388,7 +388,7 @@ wrapProperties(HttpServerRequest, true, ["method", "url", "headers", "trailers",
/// ## HttpServerResponse
///
/// This is a wrapper around node's `http.ServerResponse`.
/// This stream is writable (see WritableStream above).
/// This stream is writable (see `WritableStream` above).
///
/// * `response = new streams.HttpServerResponse(resp[, options])`
/// returns a wrapper around `resp`, an `http.ServerResponse` object.
Expand Down Expand Up @@ -461,7 +461,7 @@ function Server(emitter) {
/// creates the wrapper.
/// `requestListener` is called as `requestListener(request, response, _)`
/// where `request` and `response` are wrappers around `http.ServerRequest` and `http.ServerResponse`.
/// A fresh empty global context is set before every call to `requestListener` (see [`streamline/lib.globals](../globals.md)).
/// A fresh empty global context is set before every call to `requestListener`. See [streamline/lib/globals](../../globals.md).
/// * `server.listen(_, port[, host])`
/// * `server.listen(_, path)`
/// (same as `http.Server`)
Expand Down Expand Up @@ -495,7 +495,7 @@ exports.HttpServer = HttpServer;
///
/// This is a wrapper around node's `http.ClientResponse`
///
/// This stream is readable (see ReadableStream above).
/// This stream is readable (see `ReadableStream` above).
///
/// * `response = request.response(_)`
/// returns the response stream.
Expand Down Expand Up @@ -575,7 +575,7 @@ function _fixHttpClientOptions(options) {
///
/// This is a wrapper around node's `http.ClientRequest`.
///
/// This stream is writable (see WritableStream above).
/// This stream is writable (see `WritableStream` above).
///
/// * `request = streams.httpRequest(options)`
/// creates the wrapper.
Expand Down Expand Up @@ -641,7 +641,7 @@ exports.httpRequest = function(options) {
///
/// This is a wrapper around streams returned by TCP and socket clients:
///
/// These streams are both readable and writable (see ReadableStream and WritableStream above).
/// These streams are both readable and writable (see `ReadableStream` and `WritableStream` above).
///
/// * `stream = new streams.NetStream(stream[, options])`
/// creates a network stream wrapper.
Expand Down Expand Up @@ -721,7 +721,7 @@ function NetClient(options, args) {
/// creates the wrapper.
/// `connectionListener` is called as `connectionListener(stream, _)`
/// where `stream` is a `NetStream` wrapper around the native connection.
/// A fresh empty global context is set before every call to `connectionListener` (see [`streamline/lib.globals](../globals.md)).
/// A fresh empty global context is set before every call to `connectionListener`. See [streamline/lib/globals](../../globals.md).
/// * `server.listen(_, port[, host])`
/// * `server.listen(_, path)`
/// (same as `net.Server`)
Expand Down
16 changes: 8 additions & 8 deletions lib/streams/server/streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more information on this design,
see [this blog post](http://bjouhier.wordpress.com/2011/04/25/asynchronous-episode-3-adventures-in-event-land/)

For a simple example of this API in action,
see the [google client example](../../../examples/streams/googleClient_.js)
see the [google client example](../../../examples/streams/googleClient._js)

## Wrapper

Expand Down Expand Up @@ -73,7 +73,7 @@ All writable stream wrappers derive from this wrapper.
## HttpServerRequest

This is a wrapper around node's `http.ServerRequest`:
This stream is readable (see ReadableStream above).
This stream is readable (see `ReadableStream` above).

* `request = new streams.HttpServerRequest(req[, options])`
returns a wrapper around `req`, an `http.ServerRequest` object.
Expand All @@ -90,7 +90,7 @@ This stream is readable (see ReadableStream above).
## HttpServerResponse

This is a wrapper around node's `http.ServerResponse`.
This stream is writable (see WritableStream above).
This stream is writable (see `WritableStream` above).

* `response = new streams.HttpServerResponse(resp[, options])`
returns a wrapper around `resp`, an `http.ServerResponse` object.
Expand All @@ -111,7 +111,7 @@ This is a wrapper around node's `http.Server` object:
creates the wrapper.
`requestListener` is called as `requestListener(request, response, _)`
where `request` and `response` are wrappers around `http.ServerRequest` and `http.ServerResponse`.
A fresh empty global context is set before every call to `requestListener` (see [`streamline/lib.globals](../globals.md)).
A fresh empty global context is set before every call to `requestListener`. See [streamline/lib/globals](../../globals.md).
* `server.listen(_, port[, host])`
* `server.listen(_, path)`
(same as `http.Server`)
Expand All @@ -120,7 +120,7 @@ This is a wrapper around node's `http.Server` object:

This is a wrapper around node's `http.ClientResponse`

This stream is readable (see ReadableStream above).
This stream is readable (see `ReadableStream` above).

* `response = request.response(_)`
returns the response stream.
Expand All @@ -141,7 +141,7 @@ This stream is readable (see ReadableStream above).

This is a wrapper around node's `http.ClientRequest`.

This stream is writable (see WritableStream above).
This stream is writable (see `WritableStream` above).

* `request = streams.httpRequest(options)`
creates the wrapper.
Expand All @@ -162,7 +162,7 @@ This stream is writable (see WritableStream above).

This is a wrapper around streams returned by TCP and socket clients:

These streams are both readable and writable (see ReadableStream and WritableStream above).
These streams are both readable and writable (see `ReadableStream` and `WritableStream` above).

* `stream = new streams.NetStream(stream[, options])`
creates a network stream wrapper.
Expand All @@ -188,7 +188,7 @@ This is a wrapper around node's `net.Server` object:
creates the wrapper.
`connectionListener` is called as `connectionListener(stream, _)`
where `stream` is a `NetStream` wrapper around the native connection.
A fresh empty global context is set before every call to `connectionListener` (see [`streamline/lib.globals](../globals.md)).
A fresh empty global context is set before every call to `connectionListener`. See [streamline/lib/globals](../../globals.md).
* `server.listen(_, port[, host])`
* `server.listen(_, path)`
(same as `net.Server`)
Expand Down

0 comments on commit 275c5d9

Please sign in to comment.