Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "clamp.js", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Returns a function that clamps input values to range [min <= x <= max].", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -33,2 +33,4 @@ # clamp.js (written in ES6) | ||
Can be used with frp libraries (e.g. [Bacon.js](https://github.com/baconjs/bacon.js), [RxJS](https://github.com/Reactive-Extensions/RxJS), [Kefir.js](https://github.com/pozadi/kefir)). Examples are written with Bacon.js | ||
### in frp: | ||
@@ -40,6 +42,4 @@ | ||
const limiter = clamp(0, 3); | ||
let stream = Bacon.sequentially(1000, [1, 2, 3, 4, 5]) | ||
.map(limiter); | ||
.map(clamp(0, 3)); | ||
@@ -46,0 +46,0 @@ // every 1000ms stream emits a value which is mapped on clamp() |
Sorry, the diff of this file is not supported yet
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
7431