Comparing version 5.0.0 to 5.0.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [5.0.1](https://github.com/untool/mixinable/compare/v5.0.0...v5.0.1) (2020-04-24) | ||
### Bug Fixes | ||
* remove usage of exports ([1b5cc14](https://github.com/untool/mixinable/commit/1b5cc14d9405506d3494aba960bb1a5ffaf89824)) | ||
## [5.0.0](https://github.com/untool/mixinable/compare/v4.0.0...v5.0.0) (2020-04-24) | ||
@@ -7,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
function r(r){for(var n=[],e=arguments.length-1;e-- >0;)n[e]=arguments[e+1];var t=r.slice().pop();if(o(t))return t.apply(void 0,n)}var n={callable:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return p(exports.override).apply(void 0,r)},override:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return p(exports.override).apply(void 0,r)},parallel:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return p(exports.parallel).apply(void 0,r)},pipe:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return p(exports.pipe).apply(void 0,r)},compose:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return p(exports.compose).apply(void 0,r)}},e={callable:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.override).apply(void 0,r)},override:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.override).apply(void 0,r)},sequence:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.parallel).apply(void 0,r)},parallel:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.parallel).apply(void 0,r)},pipe:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.pipe).apply(void 0,r)},compose:function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return i(exports.compose).apply(void 0,r)}};function o(r){return"function"==typeof r}function t(r){return r&&o(r.then)&&r instanceof Promise}function p(r){return function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var o=r.apply(void 0,n);return t(o)?o:Promise.resolve(o)}}function i(r){return function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var o=r.apply(void 0,n);if(t(o))throw new Error("got promise in sync mode");return o}}exports.define=function(r,n){var e=function(){for(var e=this,t=[],p=arguments.length;p--;)t[p]=arguments[p];var i=(n||[]).map(function(r){return new(Function.prototype.bind.apply(r,[null].concat(t)))});Object.keys(r||{}).forEach(function(n){e[n]=r[n].bind(e,i.reduce(function(r,e){return o(e[n])&&r.push(e[n].bind(e)),r},[])),i.forEach(function(r){r[n]=e[n]})})};return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];return new(Function.prototype.bind.apply(e,[null].concat(r)))}},exports.override=r,exports.callable=r,exports.parallel=function(r){for(var n=[],e=arguments.length-1;e-- >0;)n[e]=arguments[e+1];var o=r.map(function(r){return r.apply(void 0,n)});return o.find(t)?Promise.all(o):o},exports.pipe=function(r,n){for(var e=[],o=arguments.length-2;o-- >0;)e[o]=arguments[o+2];return r.reduce(function(r,n){return t(r)?r.then(function(r){return n.apply(void 0,[r].concat(e))}):n.apply(void 0,[r].concat(e))},n)},exports.compose=function(r){for(var n=[],e=arguments.length-1;e-- >0;)n[e]=arguments[e+1];return exports.pipe.apply(exports,[r.slice().reverse()].concat(n))},exports.async=n,exports.sync=e; | ||
function n(n){for(var r=[],o=arguments.length-1;o-- >0;)r[o]=arguments[o+1];var t=n.slice().pop();if(p(t))return t.apply(void 0,r)}function r(n){for(var r=[],o=arguments.length-1;o-- >0;)r[o]=arguments[o+1];var t=n.map(function(n){return n.apply(void 0,r)});return t.find(a)?Promise.all(t):t}function o(n,r){for(var o=[],t=arguments.length-2;t-- >0;)o[t]=arguments[t+2];return n.reduce(function(n,r){return a(n)?n.then(function(n){return r.apply(void 0,[n].concat(o))}):r.apply(void 0,[n].concat(o))},r)}function t(n){for(var r=[],t=arguments.length-1;t-- >0;)r[t]=arguments[t+1];return o.apply(void 0,[n.slice().reverse()].concat(r))}var e={callable:function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return u(n).apply(void 0,r)},override:function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return u(n).apply(void 0,r)},parallel:function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return u(r).apply(void 0,n)},pipe:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return u(o).apply(void 0,n)},compose:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return u(t).apply(void 0,n)}},i={callable:function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return l(n).apply(void 0,r)},override:function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return l(n).apply(void 0,r)},sequence:function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return l(r).apply(void 0,n)},parallel:function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return l(r).apply(void 0,n)},pipe:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(o).apply(void 0,n)},compose:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(t).apply(void 0,n)}};function p(n){return"function"==typeof n}function a(n){return n&&p(n.then)&&n instanceof Promise}function u(n){return function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];var t=n.apply(void 0,r);return a(t)?t:Promise.resolve(t)}}function l(n){return function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];var t=n.apply(void 0,r);if(a(t))throw new Error("got promise in sync mode");return t}}exports.define=function(n,r){var o=function(){for(var o=this,t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(r||[]).map(function(n){return new(Function.prototype.bind.apply(n,[null].concat(t)))});Object.keys(n||{}).forEach(function(r){o[r]=n[r].bind(o,i.reduce(function(n,o){return p(o[r])&&n.push(o[r].bind(o)),n},[])),i.forEach(function(n){n[r]=o[r]})})};return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return new(Function.prototype.bind.apply(o,[null].concat(n)))}},exports.override=n,exports.callable=n,exports.parallel=r,exports.pipe=o,exports.compose=t,exports.async=e,exports.sync=i; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.mixinable={})}(this,function(n){function r(n){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];var o=n.slice().pop();if(t(o))return o.apply(void 0,r)}var e={callable:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return p(n.override).apply(void 0,r)},override:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return p(n.override).apply(void 0,r)},parallel:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return p(n.parallel).apply(void 0,r)},pipe:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return p(n.pipe).apply(void 0,r)},compose:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return p(n.compose).apply(void 0,r)}},o={callable:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.override).apply(void 0,r)},override:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.override).apply(void 0,r)},sequence:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.parallel).apply(void 0,r)},parallel:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.parallel).apply(void 0,r)},pipe:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.pipe).apply(void 0,r)},compose:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return a(n.compose).apply(void 0,r)}};function t(n){return"function"==typeof n}function i(n){return n&&t(n.then)&&n instanceof Promise}function p(n){return function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var o=n.apply(void 0,r);return i(o)?o:Promise.resolve(o)}}function a(n){return function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var o=n.apply(void 0,r);if(i(o))throw new Error("got promise in sync mode");return o}}n.define=function(n,r){var e=function(){for(var e=this,o=[],i=arguments.length;i--;)o[i]=arguments[i];var p=(r||[]).map(function(n){return new(Function.prototype.bind.apply(n,[null].concat(o)))});Object.keys(n||{}).forEach(function(r){e[r]=n[r].bind(e,p.reduce(function(n,e){return t(e[r])&&n.push(e[r].bind(e)),n},[])),p.forEach(function(n){n[r]=e[r]})})};return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return new(Function.prototype.bind.apply(e,[null].concat(n)))}},n.override=r,n.callable=r,n.parallel=function(n){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];var o=n.map(function(n){return n.apply(void 0,r)});return o.find(i)?Promise.all(o):o},n.pipe=function(n,r){for(var e=[],o=arguments.length-2;o-- >0;)e[o]=arguments[o+2];return n.reduce(function(n,r){return i(n)?n.then(function(n){return r.apply(void 0,[n].concat(e))}):r.apply(void 0,[n].concat(e))},r)},n.compose=function(r){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return n.pipe.apply(n,[r.slice().reverse()].concat(e))},n.async=e,n.sync=o}); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.mixinable={})}(this,function(n){function r(n){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];var o=n.slice().pop();if(a(o))return o.apply(void 0,r)}function e(n){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];var o=n.map(function(n){return n.apply(void 0,r)});return o.find(f)?Promise.all(o):o}function o(n,r){for(var e=[],o=arguments.length-2;o-- >0;)e[o]=arguments[o+2];return n.reduce(function(n,r){return f(n)?n.then(function(n){return r.apply(void 0,[n].concat(e))}):r.apply(void 0,[n].concat(e))},r)}function t(n){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return o.apply(void 0,[n.slice().reverse()].concat(r))}var i={callable:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return p(r).apply(void 0,n)},override:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return p(r).apply(void 0,n)},parallel:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return p(e).apply(void 0,n)},pipe:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return p(o).apply(void 0,n)},compose:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return p(t).apply(void 0,n)}},u={callable:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return l(r).apply(void 0,n)},override:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return l(r).apply(void 0,n)},sequence:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(e).apply(void 0,n)},parallel:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(e).apply(void 0,n)},pipe:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(o).apply(void 0,n)},compose:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return l(t).apply(void 0,n)}};function a(n){return"function"==typeof n}function f(n){return n&&a(n.then)&&n instanceof Promise}function p(n){return function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var o=n.apply(void 0,r);return f(o)?o:Promise.resolve(o)}}function l(n){return function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var o=n.apply(void 0,r);if(f(o))throw new Error("got promise in sync mode");return o}}n.define=function(n,r){var e=function(){for(var e=this,o=[],t=arguments.length;t--;)o[t]=arguments[t];var i=(r||[]).map(function(n){return new(Function.prototype.bind.apply(n,[null].concat(o)))});Object.keys(n||{}).forEach(function(r){e[r]=n[r].bind(e,i.reduce(function(n,e){return a(e[r])&&n.push(e[r].bind(e)),n},[])),i.forEach(function(n){n[r]=e[r]})})};return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];return new(Function.prototype.bind.apply(e,[null].concat(n)))}},n.override=r,n.callable=r,n.parallel=e,n.pipe=o,n.compose=t,n.async=i,n.sync=u}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "mixinable", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Functional JavaScript Mixin Utility", | ||
@@ -56,3 +56,6 @@ "source": "src/index.js", | ||
"eslintConfig": { | ||
"extends": "@untool/eslint-config" | ||
"extends": "@untool/eslint-config", | ||
"env": { | ||
"node": false | ||
} | ||
}, | ||
@@ -59,0 +62,0 @@ "lint-staged": { |
@@ -57,3 +57,3 @@ export function define(strategies, mixins) { | ||
export function compose(functions, ...args) { | ||
return exports.pipe(functions.slice().reverse(), ...args); | ||
return pipe(functions.slice().reverse(), ...args); | ||
} | ||
@@ -63,15 +63,15 @@ | ||
callable: function callableAsync(...args) { | ||
return asynchronize(exports.override)(...args); | ||
return asynchronize(override)(...args); | ||
}, | ||
override: function overrideAsync(...args) { | ||
return asynchronize(exports.override)(...args); | ||
return asynchronize(override)(...args); | ||
}, | ||
parallel: function parallelAsync(...args) { | ||
return asynchronize(exports.parallel)(...args); | ||
return asynchronize(parallel)(...args); | ||
}, | ||
pipe: function pipeAsync(...args) { | ||
return asynchronize(exports.pipe)(...args); | ||
return asynchronize(pipe)(...args); | ||
}, | ||
compose: function composeAsync(...args) { | ||
return asynchronize(exports.compose)(...args); | ||
return asynchronize(compose)(...args); | ||
}, | ||
@@ -82,18 +82,18 @@ }; | ||
callable: function callableSync(...args) { | ||
return synchronize(exports.override)(...args); | ||
return synchronize(override)(...args); | ||
}, | ||
override: function overrideSync(...args) { | ||
return synchronize(exports.override)(...args); | ||
return synchronize(override)(...args); | ||
}, | ||
sequence: function sequenceSync(...args) { | ||
return synchronize(exports.parallel)(...args); | ||
return synchronize(parallel)(...args); | ||
}, | ||
parallel: function parallelSync(...args) { | ||
return synchronize(exports.parallel)(...args); | ||
return synchronize(parallel)(...args); | ||
}, | ||
pipe: function pipeSync(...args) { | ||
return synchronize(exports.pipe)(...args); | ||
return synchronize(pipe)(...args); | ||
}, | ||
compose: function composeSync(...args) { | ||
return synchronize(exports.compose)(...args); | ||
return synchronize(compose)(...args); | ||
}, | ||
@@ -100,0 +100,0 @@ }; |
@@ -0,1 +1,2 @@ | ||
/* global setTimeout */ | ||
import test from 'ava'; | ||
@@ -2,0 +3,0 @@ import * as mixinable from './index'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
62817
813