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

ioperator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioperator - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

34

ioperator.js

@@ -1,10 +0,9 @@

// @flow
/*::
/* @flow */
/* ::
type Action = string;
type IO = { io: Action, then: Function }
type Actions = { [Action]: (IO) => any }
type IO = { io: Action, then?: Function };
type Actions = { [Action]: (any) => any };
*/
function isIO(value /*: mixed */) {
function isIO(value) {
return Boolean(

@@ -29,4 +28,5 @@ value != null &&

// Work out what's next
if (isIO(nextIO)) {
return run_(actions, nextIO);
return run_(actions, nextIO); // Process more IO
} else {

@@ -41,12 +41,16 @@ return nextIO; // final result

module.exports.run = function run(actions /*:Actions*/, io /*:IO*/) {
if (!actions) {
throw new Error('ioperator.run called without actions');
}
module.exports = {
run: function(actions /*:Actions*/, io /*:IO*/) /*:Promise<*>*/ {
if (!actions) {
throw new Error('ioperator.run called without actions');
}
if (!isIO(io)) {
throw new Error('ioperator.run called with a non io-action: ' + io);
if (!isIO(io)) {
throw new Error(
'ioperator.run called with a non io-action: ' + String(io)
);
}
return run_(actions, io);
}
return run_(actions, io);
};
{
"name": "ioperator",
"version": "2.2.0",
"version": "2.2.1",
"main": "ioperator.js",

@@ -10,3 +10,3 @@ "repository": "git@github.com:pokle/ioperator.git",

"clean": "rm -rf coverage",
"test": "jest --coverage",
"test": "flow check && jest --coverage",
"bench": "node tests/bench.js"

@@ -17,2 +17,3 @@ },

"benchmark": "2.1.4",
"flow-bin": "0.58.0",
"jest-cli": "21.2.1"

@@ -19,0 +20,0 @@ },

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