Skip to content

Commit

Permalink
0.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Oct 10, 2018
1 parent b0f9180 commit 52b83e3
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 4 deletions.
7 changes: 7 additions & 0 deletions dist/karet.xhr.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ var apply = /*#__PURE__*/I.curry(function apply(f, xs) {
}, template(xs));
});

var tap = /*#__PURE__*/I.curryN(2, function tap(action) {
return map(function (result) {
return action(result), result;
});
});

var renamed = process.env.NODE_ENV === 'production' ? function (x) {
return x;
} : function renamed(fn, name) {
Expand Down Expand Up @@ -452,6 +458,7 @@ exports.isXHR = isXHR;
exports.IdentitySucceeded = IdentitySucceeded;
exports.template = template;
exports.apply = apply;
exports.tap = tap;
exports.downHasSucceeded = downHasSucceeded;
exports.headersReceived = headersReceived;
exports.responseFull = responseFull;
Expand Down
8 changes: 7 additions & 1 deletion dist/karet.xhr.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ var apply = /*#__PURE__*/curry(function apply(f, xs) {
}, template(xs));
});

var tap = /*#__PURE__*/curryN(2, function tap(action) {
return map(function (result) {
return action(result), result;
});
});

var renamed = process.env.NODE_ENV === 'production' ? function (x) {
return x;
} : function renamed(fn, name) {
Expand All @@ -393,4 +399,4 @@ var headersReceived = /*#__PURE__*/renamed(isStatusAvailable, 'headersReceived')
var responseFull = /*#__PURE__*/renamed(response, 'responseFull');
var upHasSucceeded = /*#__PURE__*/renamed(upHasCompleted, 'upHasSucceeded');

export { perform, upHasStarted, upIsProgressing, upHasCompleted, upHasFailed, upHasTimedOut, upHasEnded, upLoaded, upTotal, upError, downHasStarted, downIsProgressing, downHasCompleted, downHasFailed, downHasTimedOut, downHasEnded, downLoaded, downTotal, downError, readyState, isStatusAvailable, isDone, isProgressing, hasFailed, hasTimedOut, loaded, total, errors, response, responseType, responseURL, responseText, responseXML, status, statusIsHttpSuccess, statusText, responseHeader, allResponseHeaders, timeout, withCredentials, isHttpSuccess, performWith, performJson, hasSucceeded, getJson, result, of, chain, map, ap, Succeeded, isXHR, IdentitySucceeded, template, apply, downHasSucceeded, headersReceived, responseFull, upHasSucceeded };
export { perform, upHasStarted, upIsProgressing, upHasCompleted, upHasFailed, upHasTimedOut, upHasEnded, upLoaded, upTotal, upError, downHasStarted, downIsProgressing, downHasCompleted, downHasFailed, downHasTimedOut, downHasEnded, downLoaded, downTotal, downError, readyState, isStatusAvailable, isDone, isProgressing, hasFailed, hasTimedOut, loaded, total, errors, response, responseType, responseURL, responseText, responseXML, status, statusIsHttpSuccess, statusText, responseHeader, allResponseHeaders, timeout, withCredentials, isHttpSuccess, performWith, performJson, hasSucceeded, getJson, result, of, chain, map, ap, Succeeded, isXHR, IdentitySucceeded, template, apply, tap, downHasSucceeded, headersReceived, responseFull, upHasSucceeded };
7 changes: 7 additions & 0 deletions dist/karet.xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@
}, template(xs));
});

var tap = /*#__PURE__*/I.curryN(2, function tap(action) {
return map(function (result) {
return action(result), result;
});
});

var renamed = function renamed(fn, name) {
var warned = false;
return setName(function deprecated(x) {
Expand Down Expand Up @@ -444,6 +450,7 @@
exports.IdentitySucceeded = IdentitySucceeded;
exports.template = template;
exports.apply = apply;
exports.tap = tap;
exports.downHasSucceeded = downHasSucceeded;
exports.headersReceived = headersReceived;
exports.responseFull = responseFull;
Expand Down
2 changes: 1 addition & 1 deletion dist/karet.xhr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ <h2><a id="contents"></a> <a href="#contents">≡</a> <a href="https://github.co
</li>
<li><a href="#additional-happy-path-combinators">Additional happy path combinators</a><ul>
<li><a href="#XHR-apply"><code>XHR.apply((...responseAs) =&gt; responseB, [...xhrAs]) ~&gt; xhrB</code></a></li>
<li><a href="#XHR-tap"><code>XHR.tap(response =&gt; ignored, xhr) ~&gt; xhr</code></a></li>
<li><a href="#XHR-template"><code>XHR.template([ ... xhr ... ] | { ... xhr ... }) ~&gt; xhr</code></a></li>
</ul>
</li>
Expand Down Expand Up @@ -526,6 +527,15 @@ <h5><a id="XHR-of"></a> <a href="#contents">≡</a> <a href="https://github.com/
<h4><a id="additional-happy-path-combinators"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/karet.xhr/blob/master/README.md#additional-happy-path-combinators"></a> <a href="#additional-happy-path-combinators">Additional happy path combinators</a></h4>
<h5><a id="XHR-apply"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/karet.xhr/blob/master/README.md#XHR-apply"></a> <a href="#XHR-apply"><code>XHR.apply((...responseAs) =&gt; responseB, [...xhrAs]) ~&gt; xhrB</code></a></h5>
<p><code>XHR.apply</code> maps the given XHRs through the given function.</p>
<h5><a id="XHR-tap"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/karet.xhr/blob/master/README.md#XHR-tap"></a> <a href="#XHR-tap"><code>XHR.tap(response =&gt; ignored, xhr) ~&gt; xhr</code></a></h5>
<p><code>XHR.tap</code> wraps the XHR so that the given action is called with the response
after the XHR has succeeded. If the XHR does not succeed, the action will not
be called.</p>
<p>Note that <code>XHR.tap(action)</code> is roughly equivalent to</p>
<pre><code class="hljs lang-jsx">XHR.map(response =&gt; {
action(response)
return response
})</code></pre>
<h5><a id="XHR-template"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/karet.xhr/blob/master/README.md#XHR-template"></a> <a href="#XHR-template"><code>XHR.template([ ... xhr ... ] | { ... xhr ... }) ~&gt; xhr</code></a></h5>
<p><code>XHR.template</code> transforms a nested template of plain arrays and objects possibly
containing XHRs into a XHR.</p>
Expand Down
7 changes: 7 additions & 0 deletions docs/karet.xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@
}, template(xs));
});

var tap = /*#__PURE__*/I.curryN(2, function tap(action) {
return map(function (result) {
return action(result), result;
});
});

var renamed = function renamed(fn, name) {
var warned = false;
return setName(function deprecated(x) {
Expand Down Expand Up @@ -444,6 +450,7 @@
exports.IdentitySucceeded = IdentitySucceeded;
exports.template = template;
exports.apply = apply;
exports.tap = tap;
exports.downHasSucceeded = downHasSucceeded;
exports.headersReceived = headersReceived;
exports.responseFull = responseFull;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karet.xhr",
"version": "0.6.7",
"version": "0.6.8",
"description": "An observable wrapper for XMLHttpRequest using Kefir",
"module": "dist/karet.xhr.es.js",
"main": "dist/karet.xhr.cjs.js",
Expand Down

0 comments on commit 52b83e3

Please sign in to comment.