Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clamp.js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clamp.js - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc