Skip to content

Commit

Permalink
Updating README, fixing batch() such that it calls concatURI()
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jul 3, 2015
1 parent 5482999 commit fcd092c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ store.index();
**request( input, config )**
_Promise_

Returns a `Promise` for a `fetch()` with a double `Tuple` [`body`, `status`] as the `resolve()` argument.
Returns a `Promise` for a `fetch()` with a triple `Tuple` [`body`, `status`, `headers`] as the `resolve()` & `reject()` argument.

Example of mapping a DataStore:
```javascript
var store = haro();
store.request('https://somedomain.com/api').then(function (arg) {
console.log(arg); // [body, status]
console.log(arg); // [body, status, headers]
}, function (arg) {
console.error(arg[0]);
});
Expand Down
6 changes: 3 additions & 3 deletions lib/haro.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright 2015
* @license BSD-3-Clause
* @link http://haro.rocks
* @version 1.3.2
* @version 1.3.3
*/
"use strict";

Expand Down Expand Up @@ -241,7 +241,7 @@ class Haro {
}

if (data.length > 0) {
this.request(this.uri, {
this.request(concatURI(this.uri, null), {
method: "patch",
body: JSON.stringify(data)
}).then(function () {
Expand Down Expand Up @@ -703,7 +703,7 @@ function factory (data = null, config = {}, indexes = []) {
return new Haro(data, config, indexes);
}

factory.version = "1.3.2";
factory.version = "1.3.3";

// Node, AMD & window supported
if (typeof exports !== "undefined") {
Expand Down
6 changes: 3 additions & 3 deletions lib/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright 2015
* @license BSD-3-Clause
* @link http://haro.rocks
* @version 1.3.2
* @version 1.3.3
*/
"use strict";

Expand Down Expand Up @@ -264,7 +264,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}

if (data.length > 0) {
this.request(this.uri, {
this.request(concatURI(this.uri, null), {
method: "patch",
body: JSON.stringify(data)
}).then(function () {
Expand Down Expand Up @@ -784,7 +784,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return new Haro(data, config, indexes);
}

factory.version = "1.3.2";
factory.version = "1.3.3";

// Node, AMD & window supported
if (typeof exports !== "undefined") {
Expand Down
2 changes: 1 addition & 1 deletion lib/haro.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/haro.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haro",
"version": "1.3.2",
"version": "1.3.3",
"description": "Harō is a modern immutable DataStore using Maps, Sets, Promises, & Tuples",
"main": "lib/haro.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Haro {
}

if (data.length > 0) {
this.request(this.uri, {
this.request(concatURI(this.uri, null), {
method: "patch",
body: JSON.stringify(data)
}).then(function () {
Expand Down

0 comments on commit fcd092c

Please sign in to comment.