refract-callbag
Advanced tools
Comparing version 1.0.0-4 to 1.0.0-5
@@ -175,2 +175,19 @@ import $$observable from 'symbol-observable'; | ||
export { withEffects }; | ||
var identity = function (arg) { return arg; }; | ||
var compose = function () { | ||
var fns = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
fns[_i] = arguments[_i]; | ||
} | ||
if (fns.length === 0) { | ||
return identity; | ||
} | ||
if (fns.length === 1) { | ||
return fns[0]; | ||
} | ||
return function (arg) { | ||
return fns.reduceRight(function (previousResult, fn) { return fn(previousResult); }, arg); | ||
}; | ||
}; | ||
export { withEffects, compose }; |
18
index.js
@@ -181,2 +181,20 @@ 'use strict'; | ||
var identity = function (arg) { return arg; }; | ||
var compose = function () { | ||
var fns = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
fns[_i] = arguments[_i]; | ||
} | ||
if (fns.length === 0) { | ||
return identity; | ||
} | ||
if (fns.length === 1) { | ||
return fns[0]; | ||
} | ||
return function (arg) { | ||
return fns.reduceRight(function (previousResult, fn) { return fn(previousResult); }, arg); | ||
}; | ||
}; | ||
exports.withEffects = withEffects; | ||
exports.compose = compose; |
{ | ||
"name": "refract-callbag", | ||
"version": "1.0.0-4", | ||
"version": "1.0.0-5", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "jsnext:main": "index.es.js", |
import { withEffects } from './withEffects' | ||
import { ObservableComponent, Aperture } from './observable' | ||
import { ErrorHandler, Handler, ObserveOptions } from './baseTypes' | ||
import { compose, Compose } from './compose' | ||
@@ -11,3 +12,5 @@ export { | ||
ErrorHandler, | ||
ObserveOptions | ||
ObserveOptions, | ||
compose, | ||
Compose | ||
} |
import { withEffects } from './withEffects' | ||
import { ObservableComponent, Aperture } from './observable' | ||
import { ErrorHandler, Handler, ObserveOptions } from './baseTypes' | ||
import { compose, Compose } from './compose' | ||
export { | ||
@@ -10,3 +11,5 @@ withEffects, | ||
ErrorHandler, | ||
ObserveOptions | ||
ObserveOptions, | ||
compose, | ||
Compose | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33983
16
867