Skip to content

Commit

Permalink
1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
suguru03 committed Aug 17, 2017
1 parent f595d51 commit 29646c1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 7 deletions.
31 changes: 29 additions & 2 deletions dist/aigle-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,9 @@ var Aigle = (function (AigleCore) {
};

/**
* `Aigle#sortBy` will execute [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy) using a previous promise value and a defined iterator.
* The value will be assigned as the first argument to [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy) and
* the iterator will be assigned as the second argument.
* @param {Function|string} iterator
* @return {Aigle} Returns an Aigle instance
* @example
Expand Down Expand Up @@ -2216,6 +2219,7 @@ var Aigle = (function (AigleCore) {
};

/**
* `Aigle#sortBySeries` is almost the same as [`Aigle#sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy), but it will work in series.
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
* @example
Expand Down Expand Up @@ -2257,6 +2261,8 @@ var Aigle = (function (AigleCore) {
};

/**
* `Aigle#sortByLimit` is almost the same as [`Aigle#sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy)
* and [`Aigle#sortBySeries`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBySeries)), but it will work with concurrency.
* @param {number} [limit=8]
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -3074,6 +3080,8 @@ var Aigle = (function (AigleCore) {
};

/**
* After a previous promise is resolved, the timer will be started with `ms`.
* After `ms`, the delay's promise will be resolved with the previous promise value.
* @param {number} ms
* @example
* Aigle.resolve()
Expand Down Expand Up @@ -3898,11 +3906,22 @@ function mixin(sources, opts) {

var override = opts.override;
var promisify = opts.promisify; if ( promisify === void 0 ) promisify = true;
Object.keys(sources).forEach(function (key) {
Object.getOwnPropertyNames(sources).forEach(function (key) {
var func = sources[key];
if (typeof func !== 'function' || Aigle[key] && !override) {
return;
}
// check lodash chain
if (key === 'chain') {
var obj = func();
if (obj && obj.__chain__) {
Aigle.chain = _resolve;
Aigle.prototype.value = function() {
return this;
};
return;
}
}
var Proxy = createProxy(func, promisify);
Aigle[key] = function(value, arg1, arg2, arg3) {
return new Proxy(value, arg1, arg2, arg3)._execute();
Expand All @@ -3911,6 +3930,7 @@ function mixin(sources, opts) {
return addProxy(this, Proxy, arg1, arg2, arg3);
};
});
return Aigle;
}

}).call(this,require('_process'))
Expand Down Expand Up @@ -4373,6 +4393,7 @@ var Delay = (function (Aigle) {
module.exports = { delay: delay, Delay: Delay };

/**
* Return a promise which will be resolved with `value` after `ms`.
* @param {number} ms
* @param {*} value
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -10243,6 +10264,8 @@ function callResolveObject(criteria, index) {
}

/**
* It iterates all elements of `collection` and executes `iterator` using each element on parallel.
* It creates a sorted array which is ordered by results of iterator.
* @param {Array|Object} collection
* @param {Function|string} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -10344,6 +10367,8 @@ function callResolveObject(criteria, index) {
}

/**
* `Aigle.sortByLimit` is almost the smae as [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBy) and
* [`Aigle.sortBySeries`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBySeries), but it will work with concurrency.
* @param {Array|Object} collection
* @param {integer} [limit=8]
* @param {Function} iterator
Expand Down Expand Up @@ -10450,6 +10475,8 @@ function callResolveObject(criteria, index) {
}

/**
* `Aigle.sortBySeries` is almost the smae as [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBy), but it will work in series.
*
* @param {Array|Object} collection
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -11944,7 +11971,7 @@ process.umask = function() { return 0; };
},{"_process":79}],81:[function(require,module,exports){
module.exports={
"name": "aigle",
"version": "1.7.0",
"version": "1.7.1",
"description": "Aigle is an ideal Promise library, faster and more functional than other Promise libraries",
"main": "index.js",
"browser": "browser.js",
Expand Down
2 changes: 1 addition & 1 deletion dist/aigle-es5.min.js

Large diffs are not rendered by default.

31 changes: 29 additions & 2 deletions dist/aigle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,9 @@ class Aigle extends AigleCore {
}

/**
* `Aigle#sortBy` will execute [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy) using a previous promise value and a defined iterator.
* The value will be assigned as the first argument to [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy) and
* the iterator will be assigned as the second argument.
* @param {Function|string} iterator
* @return {Aigle} Returns an Aigle instance
* @example
Expand Down Expand Up @@ -2228,6 +2231,7 @@ class Aigle extends AigleCore {
}

/**
* `Aigle#sortBySeries` is almost the same as [`Aigle#sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy), but it will work in series.
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
* @example
Expand Down Expand Up @@ -2269,6 +2273,8 @@ class Aigle extends AigleCore {
}

/**
* `Aigle#sortByLimit` is almost the same as [`Aigle#sortBy`](https://suguru03.github.io/aigle/docs/global.html#sortBy)
* and [`Aigle#sortBySeries`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBySeries)), but it will work with concurrency.
* @param {number} [limit=8]
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -3086,6 +3092,8 @@ class Aigle extends AigleCore {
}

/**
* After a previous promise is resolved, the timer will be started with `ms`.
* After `ms`, the delay's promise will be resolved with the previous promise value.
* @param {number} ms
* @example
* Aigle.resolve()
Expand Down Expand Up @@ -3766,11 +3774,22 @@ function longStackTraces() {
*/
function mixin(sources, opts = {}) {
const { override, promisify = true } = opts;
Object.keys(sources).forEach(key => {
Object.getOwnPropertyNames(sources).forEach(key => {
const func = sources[key];
if (typeof func !== 'function' || Aigle[key] && !override) {
return;
}
// check lodash chain
if (key === 'chain') {
const obj = func();
if (obj && obj.__chain__) {
Aigle.chain = _resolve;
Aigle.prototype.value = function() {
return this;
};
return;
}
}
const Proxy = createProxy(func, promisify);
Aigle[key] = function(value, arg1, arg2, arg3) {
return new Proxy(value, arg1, arg2, arg3)._execute();
Expand All @@ -3779,6 +3798,7 @@ function mixin(sources, opts = {}) {
return addProxy(this, Proxy, arg1, arg2, arg3);
};
});
return Aigle;
}

}).call(this,require('_process'))
Expand Down Expand Up @@ -4196,6 +4216,7 @@ class Delay extends Aigle {
module.exports = { delay, Delay };

/**
* Return a promise which will be resolved with `value` after `ms`.
* @param {number} ms
* @param {*} value
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -9606,6 +9627,8 @@ function callResolveObject(criteria, index) {
}

/**
* It iterates all elements of `collection` and executes `iterator` using each element on parallel.
* It creates a sorted array which is ordered by results of iterator.
* @param {Array|Object} collection
* @param {Function|string} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -9699,6 +9722,8 @@ function callResolveObject(criteria, index) {
}

/**
* `Aigle.sortByLimit` is almost the smae as [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBy) and
* [`Aigle.sortBySeries`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBySeries), but it will work with concurrency.
* @param {Array|Object} collection
* @param {integer} [limit=8]
* @param {Function} iterator
Expand Down Expand Up @@ -9797,6 +9822,8 @@ function callResolveObject(criteria, index) {
}

/**
* `Aigle.sortBySeries` is almost the smae as [`Aigle.sortBy`](https://suguru03.github.io/aigle/docs/Aigle.html#sortBy), but it will work in series.
*
* @param {Array|Object} collection
* @param {Function} iterator
* @return {Aigle} Returns an Aigle instance
Expand Down Expand Up @@ -11170,7 +11197,7 @@ process.umask = function() { return 0; };
},{"_process":79}],81:[function(require,module,exports){
module.exports={
"name": "aigle",
"version": "1.7.0",
"version": "1.7.1",
"description": "Aigle is an ideal Promise library, faster and more functional than other Promise libraries",
"main": "index.js",
"browser": "browser.js",
Expand Down
2 changes: 1 addition & 1 deletion dist/aigle.min.js

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": "aigle",
"version": "1.7.0",
"version": "1.7.1",
"description": "Aigle is an ideal Promise library, faster and more functional than other Promise libraries",
"main": "index.js",
"browser": "browser.js",
Expand Down

0 comments on commit 29646c1

Please sign in to comment.