Skip to content

Commit

Permalink
Version 4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaq committed Apr 6, 2021
1 parent 9d1d65d commit f83c729
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ be used.

You can load the EcmaScript module from various content delivery networks:

- [Skypack](https://cdn.skypack.dev/fluture-express@4.1.1)
- [JSPM](https://jspm.dev/fluture-express@4.1.1)
- [jsDelivr](https://cdn.jsdelivr.net/npm/fluture-express@4.1.1/+esm)
- [Skypack](https://cdn.skypack.dev/fluture-express@4.1.2)
- [JSPM](https://jspm.dev/fluture-express@4.1.2)
- [jsDelivr](https://cdn.jsdelivr.net/npm/fluture-express@4.1.2/+esm)

### Usage Example

Expand Down Expand Up @@ -77,48 +77,48 @@ Fluture-Express mutates the response object for you, based on a
specification of what the response should be. This specification is
captured by the Response sum-type.

#### <a name="Response" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L136">`Response :: Type`</a>
#### <a name="Response" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L136">`Response :: Type`</a>

The [daggy][] type representative of the Response type. You'll want to
use one of its constructors listed below most of the time.

#### <a name="Stream" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L149">`Stream :: Number -⁠> String -⁠> NodeReadableStream -⁠> Response a`</a>
#### <a name="Stream" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L149">`Stream :: Number -⁠> String -⁠> NodeReadableStream -⁠> Response a`</a>

Indicates a streamed response. The first argument will be the response
status code, the second will be used as a mime type, and the third will be
piped into the response to form the response data.

#### <a name="Json" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L158">`Json :: Number -⁠> Object -⁠> Response a`</a>
#### <a name="Json" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L158">`Json :: Number -⁠> Object -⁠> Response a`</a>

Indicates a JSON response. The first argument will be the response status
code, and the second will be converted to JSON and sent as-is.

#### <a name="Render" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L166">`Render :: Number -⁠> String -⁠> Object -⁠> Response a`</a>
#### <a name="Render" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L166">`Render :: Number -⁠> String -⁠> Object -⁠> Response a`</a>

Indicates a response to be rendered using a template. The first argument
will be the response status code, the second is the path to the template
file, and the third is the data to inject into the template. This uses
Express' render method under the hood, so you can configure it globally
with `app.set ('view engine', engine)` and `app.set ('views', path)`.

#### <a name="Redirect" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L177">`Redirect :: Number -⁠> String -⁠> Response a`</a>
#### <a name="Redirect" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L177">`Redirect :: Number -⁠> String -⁠> Response a`</a>

Indicates a redirection. The first argument will be the response status
code, and the second will be the value of the Location header.

#### <a name="Empty" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L185">`Empty :: Response a`</a>
#### <a name="Empty" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L185">`Empty :: Response a`</a>

Indicates an empty response. The response status will be set to 204, and
no response body or Content-Type header will be sent.

#### <a name="Next" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L191">`Next :: a -⁠> Response a`</a>
#### <a name="Next" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L191">`Next :: a -⁠> Response a`</a>

Indicates that this middleware does not form a response. The supplied value
will be assigned to `res.locals` and the next middleware will be called.

### Middleware creation utilities

#### <a name="middleware" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L199">`middleware :: ((Req, a) -⁠> Future b (Response a)) -⁠> (Req, Res a, (b -⁠> Undefined)) -⁠> Undefined`</a>
#### <a name="middleware" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L199">`middleware :: ((Req, a) -⁠> Future b (Response a)) -⁠> (Req, Res a, (b -⁠> Undefined)) -⁠> Undefined`</a>

Converts an action to an Express middleware.

Expand All @@ -129,7 +129,7 @@ appropriate mutations to the [`res`][].
If the Future rejects, the rejection reason is passed into `next` for
further [error handling with Express][].

#### <a name="dispatcher" href="https://github.com/fluture-js/fluture-express/blob/v4.1.1/index.js#L213">`dispatcher :: String -⁠> String -⁠> (Req, Res a, (Any -⁠> Undefined)) -⁠> Promise Undefined`</a>
#### <a name="dispatcher" href="https://github.com/fluture-js/fluture-express/blob/v4.1.2/index.js#L213">`dispatcher :: String -⁠> String -⁠> (Req, Res a, (Any -⁠> Undefined)) -⁠> Promise Undefined`</a>

Creates middleware that uses the export from the given file in the given
directory as an "action".
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
//.
//. You can load the EcmaScript module from various content delivery networks:
//.
//. - [Skypack](https://cdn.skypack.dev/fluture-express@4.1.1)
//. - [JSPM](https://jspm.dev/fluture-express@4.1.1)
//. - [jsDelivr](https://cdn.jsdelivr.net/npm/fluture-express@4.1.1/+esm)
//. - [Skypack](https://cdn.skypack.dev/fluture-express@4.1.2)
//. - [JSPM](https://jspm.dev/fluture-express@4.1.2)
//. - [jsDelivr](https://cdn.jsdelivr.net/npm/fluture-express@4.1.2/+esm)
//.
//. ### Usage Example
//.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fluture-express",
"version": "4.1.1",
"version": "4.1.2",
"description": "Create Express middleware using Futures",
"keywords": [
"fluture",
Expand Down

0 comments on commit f83c729

Please sign in to comment.